Skip to content

Commit 3facb38

Browse files
authored
Merge pull request #1074 from t0mgerman/issue-1073
Parsing DynamicForm defaultValue for Boolean fields - Fix for #1073
2 parents bc596cf + 69f1ceb commit 3facb38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ export class DynamicForm extends React.Component<IDynamicFormProps, IDynamicForm
441441
else if (fieldType === "Location") {
442442
defaultValue = JSON.parse(defaultValue);
443443
}
444+
else if (fieldType === "Boolean") {
445+
defaultValue = Boolean(Number(defaultValue));
446+
}
444447

445448
tempFields.push({
446449
newValue: null,

0 commit comments

Comments
 (0)