Page 1 of 1

Multiselect control with filter enabled not filtering

Posted: 26 Mar 2021, 15:43
by Praveenvue
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

Re: Multiselect control with filter enabled not filtering

Posted: 15 Apr 2021, 13:58
by tugce.kucukoglu
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,

Re: Multiselect control with filter enabled not filtering

Posted: 17 Apr 2021, 11:44
by iTuiTam
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.

Re: Multiselect control with filter enabled not filtering

Posted: 07 Feb 2022, 18:46
by Pawloski
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