fix: first data fetch when the page has initial filter conditions

Fix the first data fetch when the page has sepcial initial filter, which is related with the search filters in the page, such as the initial filter has the quick search conditions.

Change-Id: I6c285c28c67c097b9b1a4853958c4d1d669afd62
This commit is contained in:
Jingwei.Zhang 2022-08-25 10:09:01 +08:00
parent 3b84b0ad9d
commit 04f8f4d5a1

View File

@ -33,7 +33,6 @@ import Notify from 'components/Notify';
import { checkTimeIn } from 'utils/time';
import checkItemPolicy from 'resources/skyline/policy';
import NotFound from 'components/Cards/NotFound';
import { getTags } from 'components/MagicInput';
import { getPath, getLinkRender } from 'utils/route-map';
import styles from './index.less';
@ -83,8 +82,7 @@ export default class BaseList extends React.Component {
location.key === this.props.location.key
) {
const params = this.initFilter;
const { tags = [] } = getTags(params, this.searchFilters);
if (!tags.length && !this.filterTimeKey) {
if (!this.filterTimeKey) {
const { limit, page } = this.store.list;
this.list.filters = {};
this.handleFetch({ ...params, limit, page }, true);