Skip to content

Commit

Permalink
fix: on form change
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
  • Loading branch information
james-union committed Mar 1, 2023
1 parent c2eaee7 commit 8f7a26d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export const StructInput: React.FC<InputProps> = props => {
jsonFormRenderable && value ? JSON.parse(value as string) : {},
);

const onFormChange = React.useCallback(({ target: { value } }) => {
onChange(JSON.stringify(value));
setParamData(value);
const onFormChange = React.useCallback(({ formData }) => {
onChange(JSON.stringify(formData));
setParamData(formData);
}, []);

return jsonFormRenderable ? (
Expand Down

0 comments on commit 8f7a26d

Please sign in to comment.