react-filtered
Composable components for flexible filtering.
Installation
yarn add react-filtered
Usage
Consuming filtered results
Grant access to specific trees by using the Grant
.
; <FilterScope> <FreeTextSearch /> <FilterResult items="abc" "123" "def"> filteredItems </FilterResult></FilterScope>;
filterController HOC
To create components which provides filters in the scope you can use the filterController
HOC, which will provide unsetFilter()
and setFilter(filterFunc)
functions to your component.
Example usage of filterController
; { const filter = evttargetvalue; if filterlength === 0 thisprops; else thisprops; }; { return <input onChange=thisonChange />; } FreeTextSearch;