From 2d96b79bc70c2d5d04ff82f4f443cfb7bc6b6854 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 7 Jul 2021 21:27:52 -0500 Subject: make sure props really changed before rebuilding tree --- src/web/src/components/Search/Response.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/web/src/components/Search/Response.js b/src/web/src/components/Search/Response.js index 74b96b93..375a7b43 100644 --- a/src/web/src/components/Search/Response.js +++ b/src/web/src/components/Search/Response.js @@ -32,14 +32,13 @@ class Response extends Component { } componentDidUpdate = (prevProps) => { - if (this.props.response !== prevProps.response) { + if (JSON.stringify(this.props.response) !== JSON.stringify(prevProps.response)) { this.setState({ tree: buildTree(this.props.response) }); } } onFileSelectionChange = (file, state) => { file.selected = state; - console.log(this.state.tree); this.setState({ tree: this.state.tree, downloadRequest: undefined, downloadError: '' }) } -- cgit v1.2.3