diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormActions.tsx b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormActions.tsx index 5bdf02c9a..fadd463ce 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormActions.tsx +++ b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormActions.tsx @@ -12,12 +12,14 @@ export interface LaunchFormActionsProps { state: BaseInterpretedLaunchState; service: BaseLaunchService; onClose(): void; + isError: boolean; } /** Renders the Submit/Cancel buttons for a LaunchForm */ export const LaunchFormActions: React.FC = ({ state, service, onClose, + isError, }) => { const styles = useStyles(); const submissionInFlight = state.matches(LaunchState.SUBMITTING); @@ -68,7 +70,7 @@ export const LaunchFormActions: React.FC = ({ diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/UnionInput.tsx b/packages/zapp/console/src/components/Launch/LaunchForm/UnionInput.tsx index edbe21d54..272a9cc58 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/UnionInput.tsx +++ b/packages/zapp/console/src/components/Launch/LaunchForm/UnionInput.tsx @@ -57,7 +57,16 @@ const generateListOfSearchableSelectorOptions = ( }; export const UnionInput = (props: InputProps) => { - const { initialValue, required, label, onChange, typeDefinition, error, description } = props; + const { + initialValue, + required, + label, + onChange, + typeDefinition, + error, + description, + setIsError, + } = props; const classes = useStyles(); @@ -149,6 +158,7 @@ export const UnionInput = (props: InputProps) => { error: error, } as InputProps, true, + setIsError, )} diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/types.ts b/packages/zapp/console/src/components/Launch/LaunchForm/types.ts index e605a83f3..b82d6bfb5 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/types.ts +++ b/packages/zapp/console/src/components/Launch/LaunchForm/types.ts @@ -195,6 +195,7 @@ export interface InputProps { typeDefinition: InputTypeDefinition; value?: InputValue; onChange: InputChangeHandler; + setIsError: (boolean) => void; } export interface ParsedInput diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/useFormInputsState.ts b/packages/zapp/console/src/components/Launch/LaunchForm/useFormInputsState.ts index 9925a1ffc..10779e674 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/useFormInputsState.ts +++ b/packages/zapp/console/src/components/Launch/LaunchForm/useFormInputsState.ts @@ -72,6 +72,7 @@ function useFormInputState(parsedInput: ParsedInput): FormInputState { validate, value, helperText: parsedInput.description, + setIsError: () => {}, }; }