Skip to content

Commit

Permalink
Merge pull request #287 from gnbm/IssueSelectAll
Browse files Browse the repository at this point in the history
Fix issue with selectAllOnlyVisible and empty filtered list
  • Loading branch information
gnbm authored Dec 28, 2023
2 parents 8edea0e + f120107 commit 63b1be0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/virtual-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -2550,8 +2550,10 @@ export class VirtualSelect {
isAllSelected = this.isAllOptionsSelected();
}

/** when all options not selected, checking if all visible options selected */
if (!isAllSelected && this.selectAllOnlyVisible) {
/** when all options not selected, checking if all visible options selected
* Also, in a search mode, validate that we still have visible items
*/
if (!isAllSelected && this.selectAllOnlyVisible && (this.searchValue !== '' && this.visibleOptionsCount > 0 || this.searchValue == '')) {
isAllVisibleSelected = this.isAllOptionsSelected(true);
}

Expand Down

0 comments on commit 63b1be0

Please sign in to comment.