[feat][resumes] make value in Select optional

pull/309/head
Keane Chan 3 years ago
parent 4d6413a56b
commit be0fd32099
No known key found for this signature in database
GPG Key ID: 32718398E1E9F87C

@ -35,6 +35,7 @@ function Select<T>(
label,
isLabelHidden,
options,
value,
onChange,
...props
}: Props<T>,

@ -34,6 +34,7 @@ type Props = Readonly<{
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
startIcon?: React.ComponentType<React.ComponentProps<'svg'>>;
value?: string;
}> &
Readonly<Attributes>;
@ -57,6 +58,7 @@ function TextInput(
label,
startIcon: StartIcon,
type = 'text',
value,
onChange,
...props
}: Props,
@ -100,6 +102,7 @@ function TextInput(
disabled={disabled}
id={id}
type={type}
value={value != null ? value : undefined}
onChange={(event) => {
if (!onChange) {
return;

Loading…
Cancel
Save