From 8ea93b9fed2e4c6853e5db5382560d6ef7efeb98 Mon Sep 17 00:00:00 2001 From: ta-anders Date: Thu, 9 Jan 2020 23:17:46 +1000 Subject: [PATCH] fix(usefilters): fix userFilterTypes alias in setFilter action (#1842) Fix to correctly alias filterTypes to userFilterTypes in set filter action, so that the filter autoremove method is called correctly fix #1831 --- .size-snapshot.json | 12 ++++++------ src/plugin-hooks/useFilters.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.size-snapshot.json b/.size-snapshot.json index 7a70703..94b55a0 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,13 +1,13 @@ { "dist/index.js": { - "bundled": 113159, - "minified": 52747, - "gzipped": 13786 + "bundled": 113233, + "minified": 52524, + "gzipped": 13836 }, "dist/index.es.js": { - "bundled": 111809, - "minified": 51501, - "gzipped": 13598, + "bundled": 112296, + "minified": 51688, + "gzipped": 13670, "treeshaked": { "rollup": { "code": 80, diff --git a/src/plugin-hooks/useFilters.js b/src/plugin-hooks/useFilters.js index 06871a4..5b3922d 100755 --- a/src/plugin-hooks/useFilters.js +++ b/src/plugin-hooks/useFilters.js @@ -40,7 +40,7 @@ function reducer(state, action, previousState, instance) { if (action.type === actions.setFilter) { const { columnId, filterValue } = action - const { flatColumns, userFilterTypes } = instance + const { flatColumns, filterTypes: userFilterTypes } = instance const column = flatColumns.find(d => d.id === columnId)