mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 12:43:12 +08:00
[portal] add required field for companies typeahead
This commit is contained in:
@ -9,6 +9,7 @@ type Props = Readonly<{
|
||||
isLabelHidden?: boolean;
|
||||
onSelect: (option: TypeaheadOption) => void;
|
||||
placeHolder?: string;
|
||||
required?: boolean;
|
||||
}>;
|
||||
|
||||
export default function CompaniesTypeahead({
|
||||
@ -16,6 +17,7 @@ export default function CompaniesTypeahead({
|
||||
onSelect,
|
||||
isLabelHidden,
|
||||
placeHolder,
|
||||
required,
|
||||
}: Props) {
|
||||
const [query, setQuery] = useState('');
|
||||
const companies = trpc.useQuery([
|
||||
@ -42,6 +44,7 @@ export default function CompaniesTypeahead({
|
||||
})) ?? []
|
||||
}
|
||||
placeholder={placeHolder}
|
||||
required={required}
|
||||
onQueryChange={setQuery}
|
||||
onSelect={onSelect}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user