From f8613ba869102d2d764188a05ce83da1e4a124b3 Mon Sep 17 00:00:00 2001 From: 404-html Date: Thu, 11 Jul 2024 14:09:28 +0200 Subject: [PATCH 1/2] fix: crash when opening filter panel with any filter applied on current class --- src/dashboard/Data/Browser/Browser.react.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dashboard/Data/Browser/Browser.react.js b/src/dashboard/Data/Browser/Browser.react.js index 5a5272864c..88f07a5998 100644 --- a/src/dashboard/Data/Browser/Browser.react.js +++ b/src/dashboard/Data/Browser/Browser.react.js @@ -310,7 +310,12 @@ class Browser extends DashboardView { const query = new URLSearchParams(props.location.search); if (query.has('filters')) { const queryFilters = JSON.parse(query.get('filters')); - queryFilters.forEach(filter => (filters = filters.push(new Map(filter)))); + queryFilters.forEach( + filter => + (filters = filters.push( + new Map({ ...filter, class: filter.class || props.params.className }) + )) + ); } return filters; } From 5b3bc8b1637d43b95adba9ad3ea3bd1ccb1e42b2 Mon Sep 17 00:00:00 2001 From: 404-html Date: Thu, 11 Jul 2024 14:21:21 +0200 Subject: [PATCH 2/2] fix: passing class name when setting filter using context menu --- src/components/BrowserCell/BrowserCell.react.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index c2d31de5a3..52cccf903b 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -506,7 +506,7 @@ export default class BrowserCell extends Component { pickFilter(constraint, addToExistingFilter) { const definition = Filters.Constraints[constraint]; - const { filters, type, value, field } = this.props; + const { filters, type, value, field, className } = this.props; const newFilters = addToExistingFilter ? filters : new List(); let compareTo; if (definition.comparable) { @@ -535,6 +535,7 @@ export default class BrowserCell extends Component { field, constraint, compareTo, + class: className }) ) );