From 53f379f7895c5259f71560a7b98c2680e3035990 Mon Sep 17 00:00:00 2001 From: Ryan-Sandy Lee Date: Fri, 14 Feb 2020 16:34:00 -0800 Subject: [PATCH] improves setAllFilters documentation (#1908) --- docs/api/useFilters.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/useFilters.md b/docs/api/useFilters.md index 8c40a12..e83772f 100644 --- a/docs/api/useFilters.md +++ b/docs/api/useFilters.md @@ -68,8 +68,10 @@ The following values are provided to the table `instance`: - Among many other use-cases, these rows are directly useful for building option lists in filters, since the resulting filtered `rows` do not contain every possible option. - `setFilter: Function(columnId, filterValue) => void` - An instance-level function used to update the filter value for a specific column. -- `setAllFilters: Function(filtersObject) => void` +- `setAllFilters: Function(filtersObjectArray) => void` - An instance-level function used to update the values for **all** filters on the table, all at once. + - filtersObjectArray is an array of objects with id and value keys. Example: `[{ id: 'columnAccessor', value: 'valueToFilter' }]` + - Note: You must call setAllFilters with an array, even if that array is empty. eg: `setAllFilters([])`. ### Column Properties