Skip to content

Commit

Permalink
Merge pull request #1243 from Choices-js/fix-no-choices-notice
Browse files Browse the repository at this point in the history
Fix multiple-select mode "No choices to choose from" is sometimes displayed even if there are choices
  • Loading branch information
Xon authored Dec 22, 2024
2 parents 2972987 + cd16d2e commit 75601d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripts/choices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,10 @@ class Choices {
}

this._store.dispatch(removeItem(item));
const notice = this._notice;
if (notice && notice.type === NoticeTypes.noChoices) {
this._clearNotice();
}

this.passedElement.triggerEvent(EventType.removeItem, this._getChoiceForOutput(item));
}
Expand Down

0 comments on commit 75601d7

Please sign in to comment.