Skip to content

Commit 5edd04b

Browse files
Scheduler - Repeat SelectBox popup remains opened after navigating to the recurrence group (#32951)
1 parent e428045 commit 5edd04b

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,28 @@ describe('Appointment Form', () => {
12021202
expect(POM.popup.isRecurrenceGroupVisible()).toBe(true);
12031203
});
12041204

1205+
it('should close repeat selectbox popup when navigating to recurrence group via settings button', async () => {
1206+
const { POM, scheduler } = await createScheduler({
1207+
...getDefaultConfig(),
1208+
dataSource: [{ ...recurringAppointment }],
1209+
});
1210+
1211+
const dataSource = (scheduler as any).getDataSource();
1212+
const appointment = dataSource.items()[0];
1213+
1214+
scheduler.showAppointmentPopup(appointment);
1215+
POM.popup.editSeriesButton.click();
1216+
1217+
const repeatEditor = POM.popup.dxForm.getEditor('repeatEditor');
1218+
POM.popup.getInput('repeatEditor').click();
1219+
1220+
expect(repeatEditor?.option('opened')).toBe(true);
1221+
1222+
POM.popup.recurrenceSettingsButton.click();
1223+
1224+
expect(repeatEditor?.option('opened')).toBe(false);
1225+
});
1226+
12051227
it('should have disabled week day buttons when allowUpdating is false', async () => {
12061228
const { POM, scheduler } = await createScheduler({
12071229
...getDefaultConfig(),

packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type { Properties as SwitchProperties } from '@js/ui/switch';
1717
import type { Properties as TextAreaProperties } from '@js/ui/text_area';
1818
import { current, isFluent } from '@js/ui/themes';
1919
import { dateSerialization } from '@ts/core/utils/m_date_serialization';
20+
import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor';
2021
import type Popup from '@ts/ui/popup/m_popup';
2122

2223
import timeZoneUtils from '../m_utils_time_zone';
@@ -920,6 +921,11 @@ export class AppointmentForm {
920921
}
921922

922923
showRecurrenceGroup(): void {
924+
const repeatEditor = this.dxForm.getEditor(REPEAT_EDITOR_NAME);
925+
if (repeatEditor instanceof DropDownEditor) {
926+
repeatEditor.close();
927+
}
928+
923929
this._popup.updateToolbarForRecurrenceGroup();
924930

925931
const currentHeight = this.dxPopup.option('height') as string | number | undefined;

0 commit comments

Comments
 (0)