Commit eb8cb42a authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Bug: re-applying an applied filter

parent 369c1e8f
......@@ -34,10 +34,11 @@ class BrowsePage<T> extends React.Component<IBrowsePageProps<T> & any, any> {
public componentWillReceiveProps(nextProps) {
const { filterCode: prevCode, paged: prevPaged } = this.props;
const { filterCode, applyFilters, paged } = nextProps;
const { applyFilters, paged } = nextProps;
const filterCode = nextProps.filterCode || '';
if (prevPaged && paged && _.isEqual(paged.filter, prevPaged.filter)) {
if (prevCode !== filterCode) {
if (filterCode !== paged.filterCode && prevCode !== filterCode) {
applyFilters(filterCode || '');
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment