Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 3582803

Browse files
committed
feat(concertoForm): allow updating form via json prop
Signed-off-by: Diana Lease <[email protected]>
1 parent 5b3f055 commit 3582803

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/ui-concerto/src/lib/components/concertoForm.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const ConcertoForm = (props) => {
3434
const [modelManager, setModelManager] = useState(null);
3535
const { onValueChange, options, models } = props;
3636

37+
useEffect(() => {
38+
setValue(props.json);
39+
}, [props.json]);
40+
3741
const onFieldValueChange = useCallback((e, key) => {
3842
const fieldValue = e.type === 'checkbox' ? e.checked : e.value;
3943
const valueClone = set({ ...value }, key, fieldValue);

0 commit comments

Comments
 (0)