0

When I use the Dropdown with the array, but the item is not with format {value, label}, e.g.: {tag, name}, the default value is not selected and the onChange value return the whole object, instead of the tag value. I tried with dataKey="tag" but seems like it doesn't work The sample code: https://codesandbox.io/embed/primereact-kvewe

Einsamer
  • 1,069
  • 4
  • 17
  • 34
  • Maybe a codesandbox working example of this behavior can help to understand your issue – keul Jul 16 '19 at 07:29
  • You mean data is not constant? – jank Jul 16 '19 at 07:29
  • Thanks for the recommendation, this is the link to sample code https://codesandbox.io/embed/primereact-kvewe If I replace the object format and using the `dataKey`, the default selection value is not selected. – Einsamer Jul 16 '19 at 09:19

0 Answers0