fix: Fix filter search error in admin page

Use getSearchFilters function to filter data to avoid above problem

Change-Id: If560fb1c9b89d71e6bd2ebda2184859d1f868ef1
This commit is contained in:
xusongfu 2021-07-14 16:21:47 +08:00
parent 0feb52d99a
commit b80b85911a

View File

@ -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);
}