Commit 800310cb authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '198-bug-re-applying-an-applied-filter' into 'master'

Bug: re-applying an applied filter

Closes #198

See merge request genesys-pgr/genesys-ui!193
parents 369c1e8f eb8cb42a
......@@ -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