From b6813272c1bb8cea82daba2d9dfd90136d288a32 Mon Sep 17 00:00:00 2001 From: CuriousCorrelation Date: Mon, 11 Jul 2022 18:08:42 +0530 Subject: [PATCH] [WIP] Change map with `MenuItem` to `PaginatedList` --- app/components/FilterOptions.tsx | 49 +++++++++++++++++++------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/app/components/FilterOptions.tsx b/app/components/FilterOptions.tsx index 414ebca3d5..d70fbc13a0 100644 --- a/app/components/FilterOptions.tsx +++ b/app/components/FilterOptions.tsx @@ -5,6 +5,9 @@ import Button, { Inner } from "~/components/Button"; import ContextMenu from "~/components/ContextMenu"; import MenuItem from "~/components/ContextMenu/MenuItem"; import Text from "~/components/Text"; +import { Outline } from "./Input"; +import InputSearch from "./InputSearch"; +import PaginatedList, { PaginatedItem } from "./PaginatedList"; type TFilterOption = { key: string; @@ -47,26 +50,32 @@ const FilterOptions = ({ )} - {options.map((option) => ( - { - onSelect(option.key); - menu.hide(); - }} - selected={option.key === activeKey} - {...menu} - > - {option.note ? ( - - {option.label} - {option.note} - - ) : ( - option.label - )} - - ))} + {searchable && } + {searchable &&
} + ( + { + onSelect(option.key); + menu.hide(); + }} + selected={option.key === activeKey} + {...menu} + > + {option.note ? ( + + {option.label} + {option.note} + + ) : ( + option.label + )} + + )} + />
);