in src/routes/Plugin/Common/index.js [68:91]
componentDidUpdate(prevProps) {
const preId = prevProps.match.params.id;
const newId = this.props.match.params.id;
const { selectorPage, selectorPageSize } = this.state;
if (newId !== preId) {
const { dispatch } = this.props;
dispatch({
type: "common/resetData"
});
if (prevProps.plugins && prevProps.plugins.length > 0) {
this.getAllSelectors(selectorPage, selectorPageSize, prevProps.plugins);
} else {
dispatch({
type: "global/fetchPlugins",
payload: {
callback: pluginList => {
this.getAllSelectors(selectorPage, selectorPageSize, pluginList);
}
}
});
}
}
}