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 key mapping #750

Closed dhananjay-innovaccer closed 3 years ago

dhananjay-innovaccer commented 3 years ago

In dropdown pls provide the feature for mapping label and value to other keywords(suitable to dev).

Ex -lableKey ={Name}, valueKey(id)

After this config dropdown must map name as label and id as their corresponding value

veekays commented 3 years ago

@dhananjay-innovaccer This feature wouldn't be possible in DropDown because this might break things inside the component. Dropdown options schema is defined in such a way to have label and value as key in TypeScript.

In order to have this functionality you have to map the labelKey and valueKey to desired key at your end.