Skip to content

Commit 61488df

Browse files
Update packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts
Co-authored-by: Copilot <[email protected]> Signed-off-by: Aleksei Semikozov <[email protected]>
1 parent bec5083 commit 61488df

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ describe('Appointment Popup Form', () => {
13391339
});
13401340
});
13411341

1342-
describe('Form custimization', () => {
1342+
describe('Form customization', () => {
13431343
it('should propagate editing.form options to the form instance', async () => {
13441344
const { scheduler, POM } = await createScheduler({
13451345
...getDefaultConfig(),

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,8 @@ export class AppointmentForm {
237237
private createForm(items: FormProperties['items']): dxForm {
238238
const element = $('<div>');
239239
const editingConfig = this.scheduler.getEditingConfig();
240-
const userFormOptions = editingConfig?.form ?? {};
241-
242-
return this.scheduler.createComponent(element, dxForm, {
240+
const customFormOptions = editingConfig?.form ?? {};
241+
const defaultOptions: FormProperties = {
243242
items,
244243
formData: {},
245244
showColonAfterLabel: false,
@@ -293,7 +292,10 @@ export class AppointmentForm {
293292
this._$mainGroup = $formElement.find(`.${CLASSES.mainGroup}`);
294293
this._$recurrenceGroup = $formElement.find(`.${CLASSES.recurrenceGroup}`);
295294
},
296-
} as FormProperties) as dxForm;
295+
} as FormProperties;
296+
const formOptions = extend(true, defaultOptions, customFormOptions);
297+
298+
return this.scheduler.createComponent(element, dxForm, formOptions) as dxForm;
297299
}
298300

299301
private createMainFormGroup(): GroupItem {

0 commit comments

Comments
 (0)