Skip to content

fix(1636): list-not-empty#1926

Merged
mattelen merged 2 commits intomasterfrom
fix-1636
Feb 26, 2026
Merged

fix(1636): list-not-empty#1926
mattelen merged 2 commits intomasterfrom
fix-1636

Conversation

@mattelen
Copy link
Copy Markdown
Collaborator

Closes #1636.

There was #1703, however that targets the next branch, which is currently not in use.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.length instead of options.length, ensuring the message appears when all visible options are filtered out (e.g., when all items are selected with hideSelected: 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 check filteredOptions.length === 0 since 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 mattelen requested a review from akki-jat February 25, 2026 18:27
@akki-jat
Copy link
Copy Markdown
Collaborator

@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mattelen
Copy link
Copy Markdown
Collaborator Author

@mattelen do we want to check following copilot observation. Seems geniune to me.

Ah true, thanks for picking that up! Just fixed it up

@mattelen mattelen merged commit 80dd52a into master Feb 26, 2026
5 checks passed
@mattelen mattelen deleted the fix-1636 branch February 26, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'List is empty' is not shown by default (as per the docs)

3 participants