Skip to content

Conversation

@narender56
Copy link

Description

  • Added a new prop selectedText to let users set their own text to show for the selected value in the dropdown. By default, it shows the selected item label, but now you can override it with any string you want.

Why?

  • Original dropdown didn’t let me customize the displayed selected text, which I needed for my use case. This adds that flexibility without breaking anything.

How to use:

<Dropdown
  data={data}
  value={selectedValue}
  selectedText={"You picked: " + selectedValue}
  ...
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants