Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes issue #1636 where the "List is empty" message wasn't being displayed when all options were selected in a multiselect with hideSelected enabled. The fix changes the condition that determines when to show the noOptions slot from checking options.length to checking filteredOptions.length.
Changes:
- Updated the condition for displaying the "List is empty" message to check
filteredOptions.lengthinstead ofoptions.length, ensuring the message appears when all visible options are filtered out (e.g., when all items are selected withhideSelected: true)
Comments suppressed due to low confidence (1)
src/Multiselect.vue:153
- The condition has redundant logic. Both parts of the OR condition check
filteredOptions.length === 0, making the second part(hasOptionGroup === true && filteredOptions.length === 0)unnecessary. The condition can be simplified to just checkfilteredOptions.length === 0since that covers both cases.
<li v-show="showNoOptions && ((filteredOptions.length === 0 || (hasOptionGroup === true && filteredOptions.length === 0)) && !search && !loading)">
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mattelen do we want to check following copilot observation. Seems geniune to me. The condition has redundant logic. Both parts of the OR condition check filteredOptions.length === 0, making the second part (hasOptionGroup === true && filteredOptions.length === 0) unnecessary. The condition can be simplified to just check filteredOptions.length === 0 since that covers both cases. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ah true, thanks for picking that up! Just fixed it up |
Closes #1636.
There was #1703, however that targets the next branch, which is currently not in use.