From 8f7a26dfb1d1fcf622bda2074509b348269acfc0 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 28 Feb 2023 23:25:12 -0500 Subject: [PATCH] fix: on form change Signed-off-by: James --- .../src/components/Launch/LaunchForm/StructInput.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/console/src/components/Launch/LaunchForm/StructInput.tsx b/packages/console/src/components/Launch/LaunchForm/StructInput.tsx index d43c08d85..71caa12ec 100644 --- a/packages/console/src/components/Launch/LaunchForm/StructInput.tsx +++ b/packages/console/src/components/Launch/LaunchForm/StructInput.tsx @@ -87,9 +87,9 @@ export const StructInput: React.FC = 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 ? (