Skip to main content

Filter

To implement Filter component into your project you'll need to add the import:

import { Filter } from "@shoptet/ui";

After adding import into your project you can use it simply like:

<Filter
items={[
{
id: "1",
type: "text",
},
{
id: "2",
type: "number",
},
]}
renderItem={(item, index, selected) =>
`#${index} id:${item.id} type:${item.type} value:${
item.id in selected ? selected[item.id] : ""
}`
}
selectedItems={{ "1": "Hello world" }}
onResetPress={() => {}}
/>