소스 검색

quick update

create_edit_user
cyril.tsui 2 달 전
부모
커밋
ea9a4b3300
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/components/SearchBox/SearchBox.tsx

+ 2
- 2
src/components/SearchBox/SearchBox.tsx 파일 보기

@@ -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],
); );


불러오는 중...
취소
저장