Skip to content

Commit 1e009ba

Browse files
committed
fix(scheduler): address code review feedback on appointments KBN
1 parent 7a4f8a0 commit 1e009ba

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
@@ -84,8 +84,10 @@ export interface AppointmentsProperties extends DOMComponentProperties<Appointme
8484
) => void;
8585

8686
allowDelete: boolean;
87-
onDeleteKeyPress: (options:
88-
{ appointmentData: SafeAppointment; targetedAppointmentData: TargetedAppointment }) => void;
87+
onDeleteKeyPress: (options: {
88+
appointmentData: SafeAppointment;
89+
targetedAppointmentData: TargetedAppointment;
90+
}) => void;
8991
onItemActivate: (options: {
9092
data: SafeAppointment;
9193
targetedAppointmentData: TargetedAppointment;

0 commit comments

Comments
 (0)