From 25dae87a772783c2d236bd3fe1d7859f05f79810 Mon Sep 17 00:00:00 2001 From: dblythy Date: Mon, 19 Sep 2022 14:53:35 +1000 Subject: [PATCH] fix: View Relation" dialog requires browser refresh --- src/dashboard/Data/Browser/Browser.react.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dashboard/Data/Browser/Browser.react.js b/src/dashboard/Data/Browser/Browser.react.js index d1dbaa5c07..23702a7419 100644 --- a/src/dashboard/Data/Browser/Browser.react.js +++ b/src/dashboard/Data/Browser/Browser.react.js @@ -149,6 +149,13 @@ class Browser extends DashboardView { this.cancelPendingEditRows = this.cancelPendingEditRows.bind(this); this.dataBrowserRef = React.createRef(); + window.addEventListener('popstate', () => { + this.setState({ + relation: null, + data: null, + }) + this.refresh(); + }); } componentWillMount() { @@ -832,6 +839,7 @@ class Browser extends DashboardView { const url = `${this.getRelationURL()}${filterQueryString ? `?filters=${filterQueryString}` : ''}`; history.push(url); }); + this.fetchRelation(relation, filters); } handlePointerClick({ className, id, field = 'objectId' }) {