Skip to content

Commit da5b50b

Browse files
authored
Merge pull request #6117 from formio/FIO-10040-fixed-lazyload-option-in-builder
FIO-10040: fixed an issue where lazyload option on form setting shows checked although it has the false value
2 parents 35df8cc + 7866794 commit da5b50b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/form/editForm/Form.edit.form.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ export default [
3030
tooltip: 'if it is checked, the subform is loaded after navigation to the page with this component within the wizard.',
3131
input: true,
3232
customConditional( { instance, data }) {
33-
const formInfo = instance.root?.getComponent('form')?.defaultDownloadedResources.find(res => res._id === data.form);
33+
const formComp = instance.root?.getComponent('form');
34+
const formInfo = formComp?.defaultDownloadedResources.find(res => res._id === data.form);
3435
const displayMode = 'wizard';
3536

36-
return instance.options?.editForm?.display === displayMode && formInfo && formInfo.display !== displayMode;
37+
return instance.options?.editForm?.display === displayMode && ((data.form && !formInfo) || (formInfo && formInfo.display !== displayMode));
3738
},
3839
},
3940
{

0 commit comments

Comments
 (0)