Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic list schema #944

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions packages/form-json-schema/src/defs/component.json
Original file line number Diff line number Diff line change
@@ -195,12 +195,12 @@
},
"showOutline": {
"$id": "#/component/showOutline",
"description": "Groups and dynamic lists can have a visual outline.",
"description": "Outlines groups and dynamic lists.",
"type": "boolean"
},
"verticalAlignment": {
"$id": "#/component/verticalAlignment",
"description": "Groups and dynamic lists can be vertical aligned.",
"description": "Sets the alignment of the form field children. This can either be start, center, or end. Defaults to start.",
"type": "string",
"default": "start",
"enum": [
@@ -209,6 +209,31 @@
"end"
]
},
"isRepeating": {
"$id": "#/component/isRepeating",
"description": "Defines whether the list should currently be repeating its children.",
"type": "boolean"
},
"allowAddRemove": {
"$id": "#/component/allowAddRemove",
"description": "Allow adding and removing items from a list.",
"type": "boolean"
},
"defaultRepetitions": {
"$id": "#/component/defaultRepetitions",
"description": "Default number of repetitions a dynamic list will render with, if no data is provided. Defaults to 1.",
"type": "number"
},
"disableCollapse": {
"$id": "#/component/disableCollapse",
"description": "Disable the ability of a list can be collapsed.",
"type": "boolean"
},
"nonCollapsedItems": {
"$id": "#/component/nonCollapsedItems",
"description": "Number of items that will be rendered when a list is collapsed. Defaults to 5.",
"type": "number"
},
"validate": {
"$id": "#/component/validate",
"$ref": "validate.json"
Original file line number Diff line number Diff line change
@@ -342,6 +342,29 @@
}
}
},
{
"if": {
"not": {
"properties": {
"type": {
"const": "dynamiclist"
}
},
"required": [
"type"
]
}
},
"then": {
"properties": {
"isRepeating": false,
"defaultRepetitions": false,
"allowAddRemove": false,
"disableCollapse": false,
"nonCollapsedItems": false
}
}
},
{
"if": {
"not": {
Original file line number Diff line number Diff line change
@@ -36,15 +36,15 @@ export const errors = [
message: 'boolean schema is false',
params: {},
schemaPath:
'#/properties/components/items/allOf/1/allOf/17/then/oneOf/0/properties/columnsExpression/false schema',
'#/properties/components/items/allOf/1/allOf/18/then/oneOf/0/properties/columnsExpression/false schema',
},
{
instancePath: '/components/0/columns',
keyword: 'false schema',
message: 'boolean schema is false',
params: {},
schemaPath:
'#/properties/components/items/allOf/1/allOf/17/then/oneOf/1/properties/columns/false schema',
'#/properties/components/items/allOf/1/allOf/18/then/oneOf/1/properties/columns/false schema',
},
{
instancePath: '/components/0',
@@ -53,7 +53,7 @@ export const errors = [
params: {
passingSchemas: null,
},
schemaPath: '#/properties/components/items/allOf/1/allOf/17/then/oneOf',
schemaPath: '#/properties/components/items/allOf/1/allOf/18/then/oneOf',
},
{
instancePath: '/components/0',
@@ -62,6 +62,6 @@ export const errors = [
params: {
failingKeyword: 'then',
},
schemaPath: '#/properties/components/items/allOf/1/allOf/17/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/18/if',
},
];
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ export const form = {
export const errors = [
{
instancePath: '/components/0/columns',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/then/properties/columns/false schema',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/then/properties/columns/false schema',
keyword: 'false schema',
params: {},
message: 'boolean schema is false'
},
{
instancePath: '/components/0',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/if',
keyword: 'if',
params: { failingKeyword: 'then' },
message: 'must match "then" schema'
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ export const form = {
export const errors = [
{
instancePath: '/components/0/columnsExpression',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/then/properties/columnsExpression/false schema',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/then/properties/columnsExpression/false schema',
keyword: 'false schema',
params: {},
message: 'boolean schema is false'
},
{
instancePath: '/components/0',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/if',
keyword: 'if',
params: { failingKeyword: 'then' },
message: 'must match "then" schema'
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ export const form = {
export const errors = [
{
instancePath: '/components/0/dataSource',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/then/properties/dataSource/false schema',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/then/properties/dataSource/false schema',
keyword: 'false schema',
params: {},
message: 'boolean schema is false'
},
{
instancePath: '/components/0',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/if',
keyword: 'if',
params: { failingKeyword: 'then' },
message: 'must match "then" schema'
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

export const form = {
type: 'default',
components: [
{
type: 'group',
path: 'myGroup',
isRepeating: true,
defaultRepetitions: 5,
allowAddRemove: true,
disableCollapse: false,
nonCollapsedItems: 3
}
]
};

export const errors = [
{
'instancePath': '/components/0/isRepeating',
'keyword': 'false schema',
'message': 'boolean schema is false',
'params': {},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/then/properties/isRepeating/false schema'
},
{
'instancePath': '/components/0/defaultRepetitions',
'keyword': 'false schema',
'message': 'boolean schema is false',
'params': {},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/then/properties/defaultRepetitions/false schema'
},
{
'instancePath': '/components/0/allowAddRemove',
'keyword': 'false schema',
'message': 'boolean schema is false',
'params': {},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/then/properties/allowAddRemove/false schema'
},
{
'instancePath': '/components/0/disableCollapse',
'keyword': 'false schema',
'message': 'boolean schema is false',
'params': {},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/then/properties/disableCollapse/false schema'
},
{
'instancePath': '/components/0/nonCollapsedItems',
'keyword': 'false schema',
'message': 'boolean schema is false',
'params': {},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/then/properties/nonCollapsedItems/false schema'
},
{
'instancePath': '/components/0',
'keyword': 'if',
'message': 'must match "then" schema',
'params': {
'failingKeyword': 'then'
},
'schemaPath': '#/properties/components/items/allOf/1/allOf/15/if'
}
];
17 changes: 17 additions & 0 deletions packages/form-json-schema/test/fixtures/dynamic-list-properties.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

export const form = {
type: 'default',
components: [
{
type: 'dynamiclist',
path: 'myGroup',
isRepeating: true,
defaultRepetitions: 5,
allowAddRemove: true,
disableCollapse: false,
nonCollapsedItems: 3
}
]
};

export const errors = null;
4 changes: 2 additions & 2 deletions packages/form-json-schema/test/fixtures/key-not-allowed.js
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ export const form = {
export const errors = [
{
instancePath: '/components/0/key',
schemaPath: '#/properties/components/items/allOf/1/allOf/15/then/properties/key/false schema',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/then/properties/key/false schema',
keyword: 'false schema',
params: {},
message: 'boolean schema is false'
},
{
instancePath: '/components/0',
schemaPath: '#/properties/components/items/allOf/1/allOf/15/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/if',
keyword: 'if',
params: { failingKeyword: 'then' },
message: 'must match "then" schema'
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ export const form = {
export const errors = [
{
instancePath: '/components/0/rowCount',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/then/properties/rowCount/false schema',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/then/properties/rowCount/false schema',
keyword: 'false schema',
params: {},
message: 'boolean schema is false'
},
{
instancePath: '/components/0',
schemaPath: '#/properties/components/items/allOf/1/allOf/16/if',
schemaPath: '#/properties/components/items/allOf/1/allOf/17/if',
keyword: 'if',
params: { failingKeyword: 'then' },
message: 'must match "then" schema'
6 changes: 6 additions & 0 deletions packages/form-json-schema/test/spec/validation.spec.js
Original file line number Diff line number Diff line change
@@ -278,6 +278,12 @@ describe('validation', function() {

testForm('rowCount-no-number');


testForm('dynamic-list-properties');


testForm('dynamic-list-properties-not-allowed');

});



Unchanged files with check annotations Beta

setFills((fills) => fills.filter((f) => f.id !== id));
props.onRemoveFill && props.onRemoveFill(id);
}
}), []);

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo

Check warning on line 17 in packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useMemo call and refer to those specific props inside useMemo
const slotContext = useMemo(() => ({ fills }), [ fills ]);
eventBus.on('selection.changed', scrollIntoView);
return () => eventBus.off('selection.changed', scrollIntoView);
}, [ id ]);

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array

Check warning on line 130 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has missing dependencies: 'eventBus' and 'scrollIntoView'. Either include them or remove the dependency array
useLayoutEffect(() => {
if (selection.isSelected(field)) {
return () => {
eventBus.off('selection.changed', handleSelectionChanged);
};
}, [ schema, selection ]);

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 354 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array
const [ drake, setDrake ] = useState(null);
// keep deprecated event to ensure backward compatibility
eventBus.fire('formEditor.rendered');
}, []);

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array

Check warning on line 431 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'eventBus'. Either include it or remove the dependency array
const formRenderContext = useMemo(() => ({
Children,
drake.on('cloned', handleCloned);
return () => drake.off('cloned', handleCloned);
}, [ drake ]);

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array

Check warning on line 588 in packages/form-js-editor/src/render/components/FormEditor.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'handleCloned'. Either include it or remove the dependency array
return null;
}
const callback = useMemo(() => {
return debounce(fn);
}, dependencies);

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (macos-latest, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies

Check warning on line 15 in packages/form-js-editor/src/render/hooks/useDebounce.js

GitHub Actions / Build (windows-latest, 20)

React Hook useMemo has missing dependencies: 'debounce' and 'fn'. Either include them or remove the dependency array
// cleanup async side-effect if callback #flush is provided.
useEffect(() => {
const [ resultData, setResultData ] = useState({});
// pipe to playground API
useEffect(() => {

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook

Check warning on line 68 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect contains a call to 'setInitialSchema'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [props] as a second argument to the useEffect Hook
props.onInit({
attachDataContainer: (node) => dataEditorRef.current.attachTo(node),
attachEditorContainer: (node) => formEditorRef.current.attachTo(node),
form.destroy();
formEditor.destroy();
};
}, []);

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array

Check warning on line 204 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has missing dependencies: 'additionalModules', 'data', 'editorAdditionalModules', 'editorProperties', 'emit', 'exporterConfig', 'propertiesPanelConfig', 'resultData', 'viewerAdditionalModules', and 'viewerProperties'. Either include them or remove the dependency array
useEffect(() => {
dataEditorRef.current.setValue(toString(initialData));
schema,
data
});
}, [ schema, data ]);

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (ubuntu-20.04, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (macos-latest, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

Check warning on line 237 in packages/form-js-playground/src/components/PlaygroundRoot.js

GitHub Actions / Build (windows-latest, 20)

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect
const handleDownload = useCallback(() => {