Commit 277a49f 1 parent 46be9e2 commit 277a49f Copy full SHA for 277a49f
File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { debounce , cloneNodeWithEvents } from './index' ;
2
+ import { parseBoolean } from './list-utils' ;
2
3
3
4
//Global Variables
4
5
let dragElement ;
@@ -126,8 +127,7 @@ export class Draggable {
126
127
const hasSectionsInFieldOptions =
127
128
dragElement . dataProvider ?. type === 'DROPDOWN' &&
128
129
dragElement . dataProvider ?. field_options &&
129
- dragElement . dataProvider ?. field_options . has_sections ;
130
-
130
+ parseBoolean ( dragElement . dataProvider ?. field_options ?. has_sections ) ;
131
131
// Check if the section already has the maximum number of fields
132
132
const isSectionFieldLimitExceeded =
133
133
this . dragContainer ?. children ?. length > 15 ;
Original file line number Diff line number Diff line change @@ -189,3 +189,10 @@ export function doKeyDownOperations(
189
189
selected : false ,
190
190
} ;
191
191
}
192
+
193
+ export const parseBoolean = ( value : any ) => {
194
+ if ( typeof value === 'string' ) {
195
+ return value === 'true' ;
196
+ }
197
+ return ! ! value ;
198
+ } ;
Original file line number Diff line number Diff line change 214
214
"deleteSection" : " Delete Section" ,
215
215
"disableChoiceOption" : " This option is used to create a section and cannot be edited" ,
216
216
"errorMessages" : {
217
- "DROPDOWN" : " Dropdown fields cannot be added into sections" ,
217
+ "DROPDOWN" : " This field cannot be moved into sections" ,
218
218
"MULTI_SELECT" : " Multi Select Dropdown fields cannot be added into sections" ,
219
219
"DEPENDENT_FIELD" : " Dependent fields cannot be added into sections" ,
220
220
"RELATIONSHIP" : " Lookup fields cannot be added into sections" ,
You can’t perform that action at this time.
0 commit comments