smart-filtero
v1.0.3
Published
This is an NPM package that filters out the data based on the given conditions
Downloads
3
Maintainers
Readme
smart-filter
A ReactJS hook to get multiple filters for a list of items.
How to use it?
You can use the project in this way:
Install
# with npm
npm install smart-filter
# with yarn
yarn add smart-filter
Usage
- Import the package in your app:
import {useSmartFilter} from 'smart-filter';
- Set the items and subItems from the hook and get from hook what you need:
const {
query,
setQuery,
filteredItems,
selectedItems,
selectItem,
removeItem,
getSubItems,
} = useSmartFilter(items, subItems);
```# smart-filter