Skip to content

Commit

Permalink
Set sections to initial value on render
Browse files Browse the repository at this point in the history
  • Loading branch information
paultsimura committed Feb 27, 2024
1 parent f7ca401 commit 8e816ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ function BaseOptionsSelector(props) {
[allOptions, sections],
);

// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => setSections(sliceSections()), []);

useEffect(() => {
subscribeToEnterShortcut();
subscribeToCtrlEnterShortcut();
Expand Down

0 comments on commit 8e816ff

Please sign in to comment.