Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect: Filter does not work when options is an array of strings #4071

Closed
maaattg opened this issue Jun 21, 2023 · 4 comments
Closed

MultiSelect: Filter does not work when options is an array of strings #4071

maaattg opened this issue Jun 21, 2023 · 4 comments
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@maaattg
Copy link

maaattg commented Jun 21, 2023

Describe the bug

The filter in the MultiSelect component doesn't work if the options prop is an array of primitives/strings.

This issue was previously reported in the primereact repo (see #3420) and subsequently fixed by #3380. However the issue persists in primevue.

Reproducer

https://codesandbox.io/p/sandbox/red-framework-mp2p8h?file=%2Fsrc%2FApp.vue%3A8%2C1

PrimeVue version

3.29.2

Vue version

3.x

Language

ALL

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Visit the linked Sandbox
  2. Click on the MultiSelect dropdown in the preview window
  3. In the filter field, type a keyword matching one of the options, such as "red" or "Blue"
  4. See error: no results are returned even if the filter string matches an option

Expected behavior

Given an array of primitives, the MultiSelect filter (i.e. the filter service) should compare its query string directly against them instead of targeting a property.

@maaattg maaattg added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 21, 2023
@tugcekucukoglu tugcekucukoglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 26, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Jun 26, 2023
@CraZzier
Copy link
Contributor

.

CraZzier pushed a commit to CraZzier/primevue that referenced this issue Sep 14, 2023
@cha-hin
Copy link

cha-hin commented Sep 18, 2023

+1

cha-hin pushed a commit to cha-hin/primevue that referenced this issue Sep 18, 2023
@xiscohv
Copy link

xiscohv commented Oct 2, 2023

I have the same issue, when it will be possible to have this change in the main branch?
https://stackblitz.com/edit/5waqrw?file=src%2FApp.vue

@mertsincan mertsincan added this to the 3.35.1 milestone Oct 8, 2023
mertsincan pushed a commit that referenced this issue Oct 8, 2023
Co-authored-by: jan.g <[email protected]>
@mertsincan
Copy link
Member

Fixed in #4447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

6 participants