File tree Expand file tree Collapse file tree 3 files changed +27
-10
lines changed
Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -1339,6 +1339,28 @@ describe('Appointment Popup Form', () => {
13391339 } ) ;
13401340 } ) ;
13411341
1342+ describe ( 'Form custimization' , ( ) => {
1343+ it ( 'should propagate editing.form options to the form instance' , async ( ) => {
1344+ const { scheduler, POM } = await createScheduler ( {
1345+ ...getDefaultConfig ( ) ,
1346+ editing : {
1347+ allowAdding : true ,
1348+ allowUpdating : true ,
1349+ form : {
1350+ height : 500 ,
1351+ } ,
1352+ } ,
1353+ } ) ;
1354+
1355+ scheduler . showAppointmentPopup ( commonAppointment ) ;
1356+
1357+ const { form } = POM . popup ;
1358+ const formHeight = form . option ( 'height' ) as number ;
1359+
1360+ expect ( formHeight ) . toBe ( 500 ) ;
1361+ } ) ;
1362+ } ) ;
1363+
13421364 it ( 'should update form data after another appointment was open' , async ( ) => {
13431365 const { scheduler, POM } = await createScheduler ( getDefaultConfig ( ) ) ;
13441366
Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ export class AppointmentForm {
236236
237237 private createForm ( items : FormProperties [ 'items' ] ) : dxForm {
238238 const element = $ ( '<div>' ) ;
239+ const editingConfig = this . scheduler . getEditingConfig ( ) ;
240+ const userFormOptions = editingConfig ?. form ?? { } ;
239241
240242 return this . scheduler . createComponent ( element , dxForm , {
241243 items,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {
3030
3131import dxDraggable from './draggable' ;
3232
33- import dxForm , { Item as FormItem } from './form' ;
33+ import dxForm , { Properties as FormProperties } from './form' ;
3434import dxPopup , { Properties as PopupProperties } from './popup' ;
3535
3636import dxSortable from './sortable' ;
@@ -633,17 +633,10 @@ export interface dxSchedulerOptions extends WidgetOptions<dxScheduler> {
633633 allowUpdating ?: boolean ;
634634 /**
635635 * @docid
636- * @default undefined
637636 * @public
637+ * @type dxFormOptions
638638 */
639- form ?: {
640- /**
641- * @docid
642- * @type Array<dxFormSimpleItem | dxFormGroupItem | dxFormTabbedItem | dxFormEmptyItem | dxFormButtonItem>
643- * @default []
644- * @public
645- */
646- items ?: Array < FormItem > ;
639+ form ?: FormProperties & {
647640 /**
648641 * @docid
649642 * @type_function_param 1 formData:object
You can’t perform that action at this time.
0 commit comments