From b80b85911aa7afc41bf1232842e85505178098b4 Mon Sep 17 00:00:00 2001 From: xusongfu Date: Wed, 14 Jul 2021 16:21:47 +0800 Subject: [PATCH] fix: Fix filter search error in admin page Use getSearchFilters function to filter data to avoid above problem Change-Id: If560fb1c9b89d71e6bd2ebda2184859d1f868ef1 --- src/containers/List/index.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/containers/List/index.jsx b/src/containers/List/index.jsx index 13977a46..426039bf 100644 --- a/src/containers/List/index.jsx +++ b/src/containers/List/index.jsx @@ -693,8 +693,9 @@ export default class BaseList extends React.Component { const failed = Object.keys(filtersInState).find((key) => { const value = get(data, key); const filterValue = filtersInState[key]; - - const { filterFunc } = this.searchFilters.find((i) => i.name === key); + const { filterFunc } = this.getSearchFilters().find( + (i) => i.name === key + ); if (filterFunc) { return !filterFunc(value, filterValue); }