vue-multiselect icon indicating copy to clipboard operation
vue-multiselect copied to clipboard

Option to add an x button to the deselect single selected tag?

Open thanhnambkhn opened this issue 3 years ago • 2 comments

Sometime the length of option string is long. So it is not easy to find "Deselect text" at the end of selected option. Please add an x button to the deselect single selected tag at the right of input (such as multiple option).

thanhnambkhn avatar Oct 04 '21 10:10 thanhnambkhn

You can follow these steps:

  • Use option slot for custom option template with label and x button on the same row
  • On clicking the x button will call the function that removes the current option from the selected options
  • Set deselectLabel prop to an empty string

lehoaibaokg avatar Nov 22 '21 15:11 lehoaibaokg

thanks @lehoaibaokg !

thanhnambkhn avatar Nov 22 '21 15:11 thanhnambkhn