Hi @alsoscotland, this isn't as much of an issue as a question, so feel free to close. I was wondering if I could understand better the choice of initialValue to be an object or array of object, rather than the index in the dataSource or the id of the object in the dataSource?
I either end up doing dataList[initialIndex] as the initialValue prop or construct an object. Constructing an object as initialValue makes me a little nervous as it increases the scope for making a subtle mistake.
I am probably missing some context or trick, hance the question.
@oyeanuj
I made a choice in the control that the selected value would always be an array of option objects rather than just the array of values for a particular key. This keeps that behavior consistent
Hi @alsoscotland, this isn't as much of an issue as a question, so feel free to close. I was wondering if I could understand better the choice of
initialValue
to be an object or array of object, rather than the index in thedataSource
or theid
of the object in thedataSource
?I either end up doing
dataList[initialIndex
] as theinitialValue
prop or construct an object. Constructing an object asinitialValue
makes me a little nervous as it increases the scope for making a subtle mistake.I am probably missing some context or trick, hance the question.
Thank you!