Browse Source

quick update

create_edit_user
cyril.tsui 6 months ago
parent
commit
ea9a4b3300
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/components/SearchBox/SearchBox.tsx

+ 2
- 2
src/components/SearchBox/SearchBox.tsx View File

@@ -98,7 +98,7 @@ function SearchBox<T extends string>({
const defaultAll: AutocompleteOptions = { value: "All", label: t("All"), group: t("All") } const defaultAll: AutocompleteOptions = { value: "All", label: t("All"), group: t("All") }
const defaultInputs = useMemo( const defaultInputs = useMemo(
() => () =>
criteria.reduce<Record<T, string>>(
criteria.reduce<Record<T | `${T}To`, string>>(
(acc, c) => { (acc, c) => {
return { return {
...acc, ...acc,
@@ -106,7 +106,7 @@ function SearchBox<T extends string>({
: (c.type === "autocomplete" && Boolean(c.multiple)) ? [defaultAll.value]: "") : (c.type === "autocomplete" && Boolean(c.multiple)) ? [defaultAll.value]: "")
}; };
}, },
{} as Record<T, string>,
{} as Record<T | `${T}To`, string>,
), ),
[criteria], [criteria],
); );


Loading…
Cancel
Save