Skip to content

Commit 40eda57

Browse files
committed
fix(scheduler): address code review feedback on appointments KBN
1 parent fb65e47 commit 40eda57

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

packages/devextreme/js/__internal/scheduler/appointments_new/appointments.focus_controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class AppointmentsFocusController {
1919

2020
private needRestoreFocusIndex = -1;
2121

22-
private get sortedAppointments(): SortedEntity[] {
22+
private get sortedItems(): SortedEntity[] {
2323
return this.appointments.option().getSortedItems();
2424
}
2525

@@ -110,7 +110,7 @@ export class AppointmentsFocusController {
110110

111111
private handleTabKeyDown(e: KeyboardKeyDownEvent, sortedIndex: number): void {
112112
const nextIndex = sortedIndex + (e.shift ? -1 : 1);
113-
const nextItemData = this.sortedAppointments[nextIndex];
113+
const nextItemData = this.sortedItems[nextIndex];
114114

115115
if (!nextItemData) {
116116
return;
@@ -134,15 +134,15 @@ export class AppointmentsFocusController {
134134
}
135135

136136
private handleHomeKeyDown(e: KeyboardKeyDownEvent): void {
137-
const firstSortedItem = this.sortedAppointments[0];
137+
const firstSortedItem = this.sortedItems[0];
138138
if (firstSortedItem) {
139139
e.originalEvent.preventDefault();
140140
this.focusBySortedItem(firstSortedItem);
141141
}
142142
}
143143

144144
private handleEndKeyDown(e: KeyboardKeyDownEvent): void {
145-
const lastSortedItem = this.sortedAppointments[this.sortedAppointments.length - 1];
145+
const lastSortedItem = this.sortedItems[this.sortedItems.length - 1];
146146
if (lastSortedItem) {
147147
e.originalEvent.preventDefault();
148148
this.focusBySortedItem(lastSortedItem);

packages/devextreme/js/__internal/scheduler/appointments_new/appointments.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ export interface AppointmentsProperties extends DOMComponentProperties<Appointme
5555
scrollTo: (date: Date, options?: ScrollToOptions) => void;
5656

5757
allowDelete: boolean;
58-
onDeleteKeyPress: (options:
59-
{ appointmentData: SafeAppointment; targetedAppointmentData: TargetedAppointment }) => void;
58+
onDeleteKeyPress: (options: {
59+
appointmentData: SafeAppointment;
60+
targetedAppointmentData: TargetedAppointment;
61+
}) => void;
6062
onItemActivate: (options: {
6163
data: SafeAppointment;
6264
targetedAppointmentData: TargetedAppointment;

0 commit comments

Comments
 (0)