Trim spaces on datatable search key (#12713)

This commit is contained in:
sean-brydon 2023-12-11 06:58:26 +00:00 committed by GitHub
parent 2ab7846a4a
commit 795aaca64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ export function DataTableToolbar<TData>({
className="max-w-64 mb-0 mr-auto rounded-md"
placeholder="Search"
value={(table.getColumn(searchKey)?.getFilterValue() as string) ?? ""}
onChange={(event) => table.getColumn(searchKey)?.setFilterValue(event.target.value)}
onChange={(event) => table.getColumn(searchKey)?.setFilterValue(event.target.value.trim())}
/>
)}
{isFiltered && (