Multiselect control with filter enabled not filtering

UI Components for Vue
Post Reply
Praveenvue
Posts: 2
Joined: 28 Nov 2020, 18:04

26 Mar 2021, 15:43

When we bind an array of strings to Multiselect and try to filter, it not working

https://codesandbox.io/s/hopeful-sun-u8 ... ctDemo.vue

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

15 Apr 2021, 13:58

Hi,

With new FilterService, MultiSelect filtering needs to enable filterFields or optionLabel props. If you want to customize your filtering search filterMatchMode prop is available.

Best Regards,

iTuiTam
Posts: 2
Joined: 14 Apr 2021, 12:28

17 Apr 2021, 11:44

tugce.kucukoglu wrote:
15 Apr 2021, 13:58
Hi,

With new FilterService, MultiSelect filtering needs to enable filterFields or optionLabel props. If you want to customize your filtering search filterMatchMode prop is available.

Best Regards,
Could you show an example how to use custom filters on basic array such as provied cities array?
Thank you in advance.

Pawloski
Posts: 1
Joined: 07 Feb 2022, 18:33

07 Feb 2022, 18:46

I was struggling with this too. In case you haven't found solution yet:

<MultiSelect
v-model="selectedTraders"
:options="newfilteredTraders"
optionLabel="label"
optionGroupLabel="label"
optionGroupChildren="items"
:maxSelectedLabels="1"
:selectionLimit="selectionLimit"
:filter="true"
:filterFields="['label', 'name']"
selectedItemsLabel="{0} Traders"
placeholder="Select traders"
class="multiselect-label mw-100"
:loading="loadingTraders"
loadingIcon="pi pi-spinner pi-spin"
style="max-width: 100%; min-width: 130px"
>
label and name are keys of the dictionary items

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests