Fixes type errors in the DocumentSearchForm
This commit is contained in:
parent
907df26395
commit
bfd20ea8fb
@ -62,7 +62,6 @@ export const DocumentSearchInput = ({
|
||||
?.includes(queryValue.toLowerCase()),
|
||||
);
|
||||
|
||||
// TODO: Better form formatting
|
||||
return (
|
||||
<BaseForm
|
||||
title={`Find ${DocumentTypeLabel[docType]}`}
|
||||
@ -70,7 +69,7 @@ export const DocumentSearchInput = ({
|
||||
error={null}
|
||||
onSubmit={() => selectedDoc && onSubmit(selectedDoc)}
|
||||
content={
|
||||
<Combobox
|
||||
<Combobox<AnyDocument | null>
|
||||
name={searchField}
|
||||
value={selectedDoc}
|
||||
onChange={(doc) => {
|
||||
@ -80,7 +79,7 @@ export const DocumentSearchInput = ({
|
||||
>
|
||||
<ComboboxInput
|
||||
displayValue={(doc: AnyDocument) =>
|
||||
doc && getField(doc, searchField)
|
||||
(doc && getField(doc, searchField)) ?? "(no value)"
|
||||
}
|
||||
onChange={(event) => setQueryValue(event.target.value)}
|
||||
className={`w-full p-2 rounded border bg-slate-800 text-slate-100 border-slate-700 focus:outline-none focus:ring-2 focus:ring-violet-500 transition-colors`}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user