fix: fix request twice
fix request twice when change the menu Change-Id: I8f3262f6fcaacb20a82bb82636d9ccfce921c064
This commit is contained in:
parent
b1f8c82010
commit
7662ae6a09
@ -80,19 +80,12 @@ export default class BaseList extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.unsubscribe = this.routing.history.subscribe((location) => {
|
|
||||||
if (
|
|
||||||
location.pathname === this.props.match.url &&
|
|
||||||
location.key === this.props.location.key
|
|
||||||
) {
|
|
||||||
const params = this.initFilter;
|
const params = this.initFilter;
|
||||||
if (!this.filterTimeKey) {
|
if (!this.filterTimeKey) {
|
||||||
const { limit, page } = this.store.list;
|
const { limit, page } = this.store.list;
|
||||||
this.list.filters = {};
|
this.list.filters = {};
|
||||||
this.handleFetch({ ...params, limit, page }, true);
|
this.handleFetch({ ...params, limit, page }, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
window.addEventListener('resize', this.debounceSetTableHeight);
|
window.addEventListener('resize', this.debounceSetTableHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user