Filter with data item key and text field in dropDownList

1 Answer 23 Views
DropDownList
fingate
Top achievements
Rank 1
Iron
fingate asked on 25 Mar 2024, 07:52 AM | edited on 25 Mar 2024, 07:53 AM

Hello,

I have a queastion. When I use DropDownList in Navtive components of Vue3, I want to filter with both data item key and text field.
but the method I found is only using one field.

The field properties of a DropDownList are strings or functions.
I need Array<string> like ['dataItemKey', 'textFiled']. Can I?

 

example :

data-Item-list = [
{text : 'A', value : 1},
{text : 'B', value : 2},
{text : 'C', value : 3},
{text : 'D', value : 4}
]

When I put 3, C is searched.
At the same time I put D, D is searched.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 27 Mar 2024, 09:12 PM

Hello Fingate,

You can add additional filter descriptor when you use the filterBy helper method to include the key field as well. Following is an example demonstrating this approach:

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources

fingate
Top achievements
Rank 1
Iron
commented on 09 Apr 2024, 02:34 AM

Thank for apply!
Tags
DropDownList
Asked by
fingate
Top achievements
Rank 1
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or