diff --git a/apps/portal/src/components/shared/CompaniesTypeahead.tsx b/apps/portal/src/components/shared/CompaniesTypeahead.tsx index b25f9cd8..2eacc357 100644 --- a/apps/portal/src/components/shared/CompaniesTypeahead.tsx +++ b/apps/portal/src/components/shared/CompaniesTypeahead.tsx @@ -6,10 +6,17 @@ import { trpc } from '~/utils/trpc'; type Props = Readonly<{ disabled?: boolean; + isLabelHidden?: boolean; onSelect: (option: TypeaheadOption) => void; + placeHolder?: string; }>; -export default function CompaniesTypeahead({ disabled, onSelect }: Props) { +export default function CompaniesTypeahead({ + disabled, + onSelect, + isLabelHidden, + placeHolder, +}: Props) { const [query, setQuery] = useState(''); const companies = trpc.useQuery([ 'companies.list', @@ -23,6 +30,7 @@ export default function CompaniesTypeahead({ disabled, onSelect }: Props) { return ( diff --git a/packages/ui/src/Typeahead/Typeahead.tsx b/packages/ui/src/Typeahead/Typeahead.tsx index 2197716d..54bf1f59 100644 --- a/packages/ui/src/Typeahead/Typeahead.tsx +++ b/packages/ui/src/Typeahead/Typeahead.tsx @@ -22,6 +22,7 @@ type Props = Readonly<{ ) => void; onSelect: (option: TypeaheadOption) => void; options: ReadonlyArray; + placeholder?: string; value?: TypeaheadOption; }>; @@ -35,6 +36,7 @@ export default function Typeahead({ onQueryChange, value, onSelect, + placeholder, }: Props) { const [query, setQuery] = useState(''); return ( @@ -77,6 +79,7 @@ export default function Typeahead({ displayValue={(option) => (option as unknown as TypeaheadOption)?.label } + placeholder={placeholder} onChange={(event) => { setQuery(event.target.value); onQueryChange(event.target.value, event);