Skip to content

Commit 0a892b0

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 ead739f commit 0a892b0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
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
@@ -1327,7 +1327,7 @@ describe('Appointment Popup Form', () => {
13271327
});
13281328
});
13291329

1330-
describe('Form custimization', () => {
1330+
describe('Form customization', () => {
13311331
it('should propagate editing.form options to the form instance', async () => {
13321332
const { scheduler, POM } = await createScheduler({
13331333
...getDefaultConfig(),

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,8 @@ export class AppointmentForm {
208208
private createForm(items: FormProperties['items']): dxForm {
209209
const element = $('<div>');
210210
const editingConfig = this.scheduler.getEditingConfig();
211-
const userFormOptions = editingConfig?.form ?? {};
212-
213-
return this.scheduler.createComponent(element, dxForm, {
211+
const customFormOptions = editingConfig?.form ?? {};
212+
const defaultOptions: FormProperties = {
214213
items,
215214
formData: {},
216215
showColonAfterLabel: false,
@@ -259,8 +258,11 @@ export class AppointmentForm {
259258
this._dxForm = e.component;
260259
this._recurrenceForm.dxForm = this.dxForm;
261260
},
262-
...userFormOptions,
263-
} as FormProperties) as dxForm;
261+
};
262+
263+
const formOptions = extend(true, defaultOptions, customFormOptions);
264+
265+
return this.scheduler.createComponent(element, dxForm, formOptions) as dxForm;
264266
}
265267

266268
private createMainFormGroup(): GroupItem {

0 commit comments

Comments
 (0)