diff --git a/app/components/PaginatedDropdown.tsx b/app/components/PaginatedDropdown.tsx index 914493a400..072a3b8718 100644 --- a/app/components/PaginatedDropdown.tsx +++ b/app/components/PaginatedDropdown.tsx @@ -8,10 +8,10 @@ import ContextMenu from "~/components/ContextMenu"; import MenuItem from "~/components/ContextMenu/MenuItem"; import Text from "~/components/Text"; import InputSearch from "./InputSearch"; -import PaginatedList from "./PaginatedList"; +import PaginatedList, { PaginatedItem } from "./PaginatedList"; -type TFilterOption = { - key: string; +type TFilterOption = PaginatedItem & { + id: string; label: string; note?: string; }; @@ -39,12 +39,12 @@ const PaginatedDropdown = ({ }); const options = React.useMemo(() => { const userOptions = users.all.map((user: User) => ({ - key: user.id, + id: user.id, label: user.name, })); return [ { - key: "", + id: "", label: t("Any author"), }, ...userOptions, @@ -102,12 +102,12 @@ const PaginatedDropdown = ({ fetch={users.fetchPage} renderItem={(user: TFilterOption) => ( { - onSelect(user.key); + onSelect(user.id); menu.hide(); }} - selected={user.key === activeKey} + selected={user.id === activeKey} {...menu} > {user.note ? (