This is a migrated thread and some comments may be shown as answers.

TypeScript withValueField HoC for Dropdown components

1 Answer 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rogelio
Top achievements
Rank 1
Rogelio asked on 21 Mar 2019, 03:38 PM

As of v2.0.0 for the Dropdown components, the valueField prop was removed. An example of how to re-implement the feature is provided here:

https://www.telerik.com/kendo-react-ui/components/dropdowns/combobox/common-scenarios/#toc-using-data-fields-for-values

 

The thing for me was that I am using TypeScript and needed a type safe withValueField HoC so I copied the existing HoC and added some type safety. I figured it would be helpful for any of those that are looking for the same thing.

 

Check it out here: https://gist.github.com/Weffe/c69304a00e5f955a13cae65bbcb0a86d

 

Enjoy!

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 22 Mar 2019, 08:08 AM
Hello, Rogelio,

Thank you for sharing the example with the community.

This is highly appreciated.

I have updated your Telerik points for sharing this with us.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Rogelio
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or