multiple: set sane defaults

Set sane defaults for some types rather than setting them to `undefined`.
This is so that we can set `exactOptionalPropertyTypes` to true in our
tsconfig.
This commit is contained in:
Gianluca Zuccarelli 2024-11-29 14:01:07 +00:00 committed by Lucas Garfield
parent 877497f81c
commit d4436dc6a9
11 changed files with 23 additions and 21 deletions

View file

@ -63,14 +63,14 @@ export const HookValidatedInput = ({
<TextInput
value={value}
data-testid={dataTestId}
ouiaId={ouiaId}
ouiaId={ouiaId || ''}
type={type}
onChange={onChange}
onChange={onChange!}
validated={validated}
aria-label={ariaLabel}
aria-label={ariaLabel || ''}
onBlur={handleBlur}
placeholder={placeholder}
isDisabled={isDisabled}
placeholder={placeholder || ''}
isDisabled={isDisabled || false}
/>
{validated === 'error' && (
<HelperText>
@ -119,13 +119,13 @@ export const ValidatedTextInput = ({
<TextInput
value={value}
data-testid={dataTestId}
ouiaId={ouiaId}
ouiaId={ouiaId || ''}
type="text"
onChange={onChange}
onChange={onChange!}
validated={handleValidation()}
aria-label={ariaLabel}
aria-label={ariaLabel || ''}
onBlur={handleBlur}
placeholder={placeholder}
placeholder={placeholder || ''}
/>
{!isPristine && !validator(value) && (
<HelperText>