innovaccer / design-system

Masala Design System (MDS) is an open-source design system built at Innovaccer. Figma file : https://www.figma.com/community/file/974368355920553546/masala-design-system-web-guidelines
https://mds.innovaccer.com
MIT License
84 stars 79 forks source link

Dropdown: value prop type #580

Closed mukuljainx closed 3 years ago

mukuljainx commented 3 years ago

Question: Is there any prop in option where I can pass some sort of metadata like an object or array? related to that object so I don't have to loop over again the options array to retrieve those values.

Suggestion: Right now we have value field in optionSchema which is of any type which can lead to errors if someone instead of string | number provided an object which might be intentional or by mistake, this equality will always falsy in that case. While it will be very rare as most of us can predict the equality condition using value, but why leave scope for the bug.

satyamyadav commented 3 years ago

@mukuljainx Thanks for getting our attention at it, we will be looking into this issue proactively and try to resolve it as soon as possible.