From daae08c10306fc89dbefafb2e5aa27fcf5fff19f Mon Sep 17 00:00:00 2001 From: Nikhil Narayana Date: Sat, 28 Nov 2020 20:47:05 -0800 Subject: [PATCH] clear select all if unfiltering and check the correct files array --- app/components/FileLoader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/FileLoader.js b/app/components/FileLoader.js index f16607921..fb23f2401 100644 --- a/app/components/FileLoader.js +++ b/app/components/FileLoader.js @@ -239,7 +239,7 @@ export default class FileLoader extends Component { selectAll = () => { this.setState((prevState) => ({ - selections: prevState.areAllSelected ? [] : this.props.store.files, + selections: prevState.areAllSelected ? [] : (this.props.store.filterReplays ? this.props.store.files : this.props.store.allFiles) || [], areAllSelected: !prevState.areAllSelected, })); } @@ -300,6 +300,7 @@ export default class FileLoader extends Component { this.props.setFilterReplays(false); this.setState({ selections: [], + areAllSelected: false, }); }