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() {
|
||||
this.unsubscribe = this.routing.history.subscribe((location) => {
|
||||
if (
|
||||
location.pathname === this.props.match.url &&
|
||||
location.key === this.props.location.key
|
||||
) {
|
||||
const params = this.initFilter;
|
||||
if (!this.filterTimeKey) {
|
||||
const { limit, page } = this.store.list;
|
||||
this.list.filters = {};
|
||||
this.handleFetch({ ...params, limit, page }, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
const params = this.initFilter;
|
||||
if (!this.filterTimeKey) {
|
||||
const { limit, page } = this.store.list;
|
||||
this.list.filters = {};
|
||||
this.handleFetch({ ...params, limit, page }, true);
|
||||
}
|
||||
window.addEventListener('resize', this.debounceSetTableHeight);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user