aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-07-07 21:27:52 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-07-07 21:27:52 -0500
commit2d96b79bc70c2d5d04ff82f4f443cfb7bc6b6854 (patch)
tree18d4263eab57ee80a159ed0fef5962705e5b90d0 /src
parente72889e470f30a8845aaa57368a515e108cd6dac (diff)
downloadslskd-2d96b79bc70c2d5d04ff82f4f443cfb7bc6b6854.tar.gz
make sure props really changed before rebuilding tree
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/Search/Response.js3
1 files changed, 1 insertions, 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: '' })
}