Skip to content

Commit 201e489

Browse files
Scheduler - Close Repeat SelectBox popup when navigating to recurrence group
1 parent 2245863 commit 201e489

2 files changed

Lines changed: 24 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
@@ -1307,6 +1307,28 @@ describe('Appointment Form', () => {
13071307
expect(POM.popup.isRecurrenceGroupVisible()).toBe(true);
13081308
});
13091309

1310+
it('should close repeat selectbox popup when navigating to recurrence group via settings button', async () => {
1311+
const { POM, scheduler } = await createScheduler({
1312+
...getDefaultConfig(),
1313+
dataSource: [{ ...recurringAppointment }],
1314+
});
1315+
1316+
const dataSource = (scheduler as any).getDataSource();
1317+
const appointment = dataSource.items()[0];
1318+
1319+
scheduler.showAppointmentPopup(appointment);
1320+
POM.popup.editSeriesButton.click();
1321+
1322+
const repeatEditor = POM.popup.dxForm.getEditor('repeatEditor');
1323+
POM.popup.getInput('repeatEditor').click();
1324+
1325+
expect(repeatEditor?.option('opened')).toBe(true);
1326+
1327+
POM.popup.recurrenceSettingsButton.click();
1328+
1329+
expect(repeatEditor?.option('opened')).toBe(false);
1330+
});
1331+
13101332
it('should have disabled week day buttons when allowUpdating is false', async () => {
13111333
const { POM, scheduler } = await createScheduler({
13121334
...getDefaultConfig(),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,8 @@ export class AppointmentForm {
920920
}
921921

922922
showRecurrenceGroup(): void {
923+
this.dxForm.getEditor(REPEAT_EDITOR_NAME)?.close?.();
924+
923925
this._popup.updateToolbarForRecurrenceGroup();
924926

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

0 commit comments

Comments
 (0)