mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-23 18:11:04 +08:00
[ui][typeahead] fix nullable prop (#492)
This commit is contained in:
@@ -29,17 +29,25 @@ type Props = Readonly<{
|
||||
isLabelHidden?: boolean;
|
||||
label: string;
|
||||
noResultsMessage?: string;
|
||||
nullable?: boolean;
|
||||
onQueryChange: (
|
||||
value: string,
|
||||
event: React.ChangeEvent<HTMLInputElement>,
|
||||
) => void;
|
||||
onSelect: (option: TypeaheadOption | null) => void;
|
||||
options: ReadonlyArray<TypeaheadOption>;
|
||||
textSize?: TypeaheadTextSize;
|
||||
value?: TypeaheadOption | null;
|
||||
}> &
|
||||
Readonly<Attributes>;
|
||||
Readonly<Attributes> &
|
||||
(
|
||||
| {
|
||||
nullable: true;
|
||||
onSelect: (option: TypeaheadOption | null) => void;
|
||||
}
|
||||
| {
|
||||
nullable?: false;
|
||||
onSelect: (option: TypeaheadOption) => void;
|
||||
}
|
||||
);
|
||||
|
||||
type State = 'error' | 'normal';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user