Data not found in Kendo React DropDownList

447 views Asked by At

i'm trying to figure out why my kendo react dropdownlist doesn't show any data

To be precise NO DATA FOUND.

Below there is the snippet of code with the configuration of the dropdownlist

<DropDownList
data={countryList}
defaultValue={"Please select country"}
onChange={handleCountryChange}
/>

And there is the content oh countryList when i do a console.log(countryList)

0: "Afghanistan"
1: "Albania"
2: "Algeria"
3: "Andorra"
4: "Angola"
5: "Argentina"
6: "Armenia"
7: "Australia"

and so on for all the countries
Any help would be appreciated!

1

There are 1 answers

0
AudioBubble On BEST ANSWER

Ok, I've found the solution:

In DropDownList you have to include also:
- textFieled={"name"}
- value={"admincode"}

So I can resume that textField is the data that you want to display in the DropDown and value is the value of the corresponding textField element