Skip to content

Commit e9d82b1

Browse files
authored
Merge pull request #3275 from James-Baloyi/james/f/datalist
James/f/datalist
2 parents 80bb8a8 + 1459c64 commit e9d82b1

File tree

1 file changed

+60
-12
lines changed

1 file changed

+60
-12
lines changed

shesha-reactjs/src/designer-components/dataList/settingsForm.ts

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ export const getSettings = (data: any) => {
127127
{
128128
id: nanoid(),
129129
propertyName: 'formId',
130-
label: 'Modal Form',
130+
label: 'Create Form',
131131
type: 'formAutocomplete',
132132
labelAlign: 'right',
133133
parentId: '2a5acbcf-cd52-487e-9cd7-09594a04793a',
134134
hidden: false,
135135
validate: {
136136
required: true,
137137
},
138-
}
138+
},
139139
],
140140
})
141141
.addSettingsInputRow({
@@ -242,6 +242,27 @@ export const getSettings = (data: any) => {
242242
}
243243
]
244244
})
245+
.addSettingsInputRow({
246+
id: nanoid(),
247+
parentId: '',
248+
hidden: {
249+
_code: 'return getSettingValue(data?.formSelectionMode) !== "view";',
250+
_mode: 'code',
251+
_value: false,
252+
} as any,
253+
inputs: [
254+
{
255+
id: nanoid(),
256+
propertyName: 'createFormType',
257+
label: 'Create Form Type',
258+
parentId: '',
259+
type: 'formTypeAutocomplete',
260+
jsSetting: true,
261+
width: '100%',
262+
allowClear: true,
263+
}
264+
],
265+
})
245266
.addSettingsInputRow({
246267
id: nanoid(),
247268
hidden: { _code: 'return getSettingValue(data?.canAddInline) === "no";', _mode: 'code', _value: false } as any,
@@ -251,7 +272,30 @@ export const getSettings = (data: any) => {
251272
propertyName: 'onNewListItemInitialize',
252273
label: 'New List Item Init',
253274
jsSetting: false,
254-
}
275+
},
276+
],
277+
hideLabel: true,
278+
})
279+
.addSettingsInputRow({
280+
id: nanoid(),
281+
hidden: { _code: 'return getSettingValue(data?.canAddInline) === "no";', _mode: 'code', _value: false } as any,
282+
inputs: [
283+
{
284+
id: nanoid(),
285+
propertyName: 'modalWidth',
286+
label: 'Dialog Width (%)',
287+
parentId: 'root',
288+
type: 'dropdown',
289+
allowClear: true,
290+
jsSetting: true,
291+
dropdownOptions: [
292+
{ value: '40%', label: 'Small' },
293+
{ value: '60%', label: 'Medium' },
294+
{ value: '80%', label: 'Large' },
295+
{ value: 'custom', label: 'Custom' },
296+
],
297+
width: '100%',
298+
},
255299
],
256300
hideLabel: true,
257301
})
@@ -431,15 +475,6 @@ export const getSettings = (data: any) => {
431475
description: 'Allows custom business logic to be executed on saving of new/updated row (e.g. custom validation / calculations).',
432476
exposedVariables: ROW_SAVE_EXPOSED_VARIABLES,
433477
})
434-
.addConfigurableActionConfigurator({
435-
id: nanoid(),
436-
propertyName: 'onListItemSaveSuccessAction',
437-
label: 'On List Item Save Success',
438-
parentId: 'events',
439-
description: 'Custom business logic to be executed after successfull saving of new/updated row.',
440-
hideLabel: true,
441-
jsSetting: true,
442-
})
443478
.toJson()
444479
]
445480
},
@@ -512,6 +547,19 @@ export const getSettings = (data: any) => {
512547
}
513548
]
514549
})
550+
.addSettingsInputRow({
551+
id: nanoid(),
552+
inputs: [
553+
{
554+
id: nanoid(),
555+
type: 'switch',
556+
propertyName: 'showBorder',
557+
label: "Show Border",
558+
hidden: { _code: 'return getSettingValue(data?.orientation) !== "wrap";', _mode: 'code', _value: false } as any,
559+
jsSetting: false,
560+
}
561+
]
562+
})
515563
.addSettingsInputRow({
516564
id: nanoid(),
517565
inputs: [{

0 commit comments

Comments
 (0)