Helpers
Filter helpers are ready-made functions that will make the process of creating filters easy and quick. The next functions can be applied in all components (FilterBuilder, FilterBar, FilterEditor, FilterQuery) of the React Filter Library.
| createArrayFilter | The function takes filter value as an input and returns a filtered array |
| createFilter | The function takes filter settings as an input and creates a filter |
| createFilterRule | Creates a common filtering rule for several input fields |
| getFilter | The function retrieves a filter configuration object based on the provided filter id and type |
| getFilters | Fetches a list of available filters |
| getOptions | The function returns the list of options for a specified field |
| getOptionsMap | The function extracts filtering options for multiple fields at once |
The following functions are used only for the FilterQuery component:
| getQueryHtml | Converts a FilterQuery query string into an HTML string with inline style spans for syntax coloring. |
| getQueryString | Converts a rules configuration object back into a FilterQuery query string. |