Skip to content

Commit 9926481

Browse files
committed
fix
1 parent 59a94a2 commit 9926481

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/components/CategoryList/CategoryList.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ export default class CategoryList extends React.Component {
176176
// Only include filterId in URL if the filter has an ID (modern filters)
177177
// Legacy filters without ID should work with just the filter content
178178
const url = id
179-
? `${this.props.linkPrefix}${c.name}?filters=${encodeURIComponent(filter)}&filterId=${id}`
180-
: `${this.props.linkPrefix}${c.name}?filters=${encodeURIComponent(filter)}`;
179+
? `${this.props.linkPrefix}${c.name}?filters=${encodeURIComponent(JSON.stringify(filter))}&filterId=${id}`
180+
: `${this.props.linkPrefix}${c.name}?filters=${encodeURIComponent(JSON.stringify(filter))}`;
181181
return (
182182
<div key={index} className={styles.childLink}>
183183
<Link

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,15 @@ class Browser extends DashboardView {
612612
let filters = new List();
613613
//TODO: url limit issues ( we may want to check for url limit), unlikely but possible to run into
614614
if (!props || !props.location || !props.location.search) {
615-
// No URL parameters, return empty filters (clean state)
616615
return filters;
617616
}
618617
const query = new URLSearchParams(props.location.search);
618+
619619
if (query.has('filters')) {
620-
const queryFilters = JSON.parse(query.get('filters'));
621-
queryFilters.forEach(
620+
const filtersParam = query.get('filters');
621+
if (filtersParam) {
622+
const queryFilters = JSON.parse(filtersParam);
623+
queryFilters.forEach(
622624
filter => {
623625
// Convert date strings to Parse Date objects for proper Parse query functionality
624626
const processedFilter = { ...filter, class: filter.class || props.params.className };
@@ -635,8 +637,8 @@ class Browser extends DashboardView {
635637
}
636638

637639
filters = filters.push(Map(processedFilter));
638-
}
639-
);
640+
});
641+
}
640642
}
641643
return filters;
642644
}
@@ -2395,7 +2397,7 @@ class Browser extends DashboardView {
23952397
linkPrefix={'browser/'}
23962398
filterClicked={url => {
23972399
this.resetPage();
2398-
this.props.navigate(generatePath(this.context, url));
2400+
this.props.navigate(generatePath(this.context, url), { replace: true });
23992401
}}
24002402
classClicked={() => {
24012403
this.resetPage();

0 commit comments

Comments
 (0)