Skip to content

Commit

Permalink
Disable find popup next/previous buttons if only one or no results found
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Dec 4, 2023
1 parent e86e7d0 commit 24466da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/components/view/find-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function FindPopup({ params, onChange, onFindNext, onFindPrevious }) {
className="toolbarButton findPrevious"
title="Find the previous occurrence of the phrase"
tabIndex="-1"
disabled={params.result?.total <= 1}
onClick={onFindPrevious}
/>
<div className="splitToolbarButtonSeparator"></div>
Expand All @@ -94,6 +95,7 @@ function FindPopup({ params, onChange, onFindNext, onFindPrevious }) {
className="toolbarButton findNext"
title="Find the next occurrence of the phrase"
tabIndex="-1"
disabled={params.result?.total <= 1}
onClick={onFindNext}
/>
</div>
Expand Down

0 comments on commit 24466da

Please sign in to comment.