Skip to content

Commit

Permalink
Merge pull request #10146 from jeet-dhandha/scroll_view_new_group_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Aug 2, 2022
2 parents 3abf43f + 35dc6a2 commit 869db50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/OptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ class OptionsSelector extends Component {
allOptions: newOptions,
focusedIndex: newFocusedIndex,
}, () => {
// If we just selected a new option on a multiple-selection page, scroll to the top
if (this.props.selectedOptions.length > prevProps.selectedOptions.length) {
// If we just toggled an option on a multi-selection page, scroll to top
if (this.props.selectedOptions.length !== prevProps.selectedOptions.length) {
this.scrollToIndex(0);
return;
}
Expand Down

0 comments on commit 869db50

Please sign in to comment.