You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @cherepanov, we recommend using the string type for value and eventKey. For the sake of accessibility, the value of ItemDataType.value is set to the input element and ARIA attributes in some components. I will fix the definition of ItemDataType later.
Are there any plans to alter this behavior? I initially found that some code using this feature does not work with RSuite versions below 5.50, even though it was supposed to be a documented feature.
In rsuite where are three ways to pass values
Let's consider the Dropdown/Select components family.
Currently, ItemDataType and eventKey/activeKey can be anything, either primitive or object.
The documentation states that the value can only be a string, which is not accurate according to the implementation.
Comparison is made via shallowEqual, checking values only at the first level.
Is this the intended behavior in RSuite? If so, which components should also adhere to this?
Use case here to avoid data-mapping with complex shaped-objects and pass them as is.
Passing objects as values is common thing, most ui-kits handle this. Demo
Eventually i'd like to see it in RSuire as documented feature. If this is not intended implementation should be fixed.
SelectPicker
ItemDataType[]
value - indicated as string only
InputPicker
ItemDataType[]
value - indicated as string only
DropDown
activeKey/eventKey - indicated as sting only
The text was updated successfully, but these errors were encountered: