File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff 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 ( ) ,
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments