nb-choices icon indicating copy to clipboard operation
nb-choices copied to clipboard

removeItemButton is not adding a 'x' to single select

Open ganeshkantu opened this issue 7 years ago • 4 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

The removeItemButton option which is set to true by default does not add a 'x' to single selects. Works correctly for multi-selects and text.

Expected behavior

If the removeItemButton option is set to true, an option to clear the value in single select should be added.

Minimal reproduction of the problem with instructions

The demo has this problem.

What is the motivation / use case for changing the behavior?

This option works correctly in choices.js. This wrapper should replicate that behavior.

Environment


Angular version: 5.1.0


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
Others:

ganeshkantu avatar Jan 30 '18 16:01 ganeshkantu

Hey,

The single select does not support the x button.

NetanelBasal avatar Jan 30 '18 17:01 NetanelBasal

Hey - thanks for the lib btw!

Take a look at the demo page for choices.js - https://joshuajohnson.co.uk/Choices/ Scroll down to single select - there is a demo with a remove button which is used to clear the selection.

ganeshkantu avatar Jan 30 '18 17:01 ganeshkantu

Yes, because design changes, I dropped the support, for now, I don't have time right now, so if you want this, I would love to see a pull request.

NetanelBasal avatar Jan 30 '18 17:01 NetanelBasal

Cool. Will take a look.

ganeshkantu avatar Jan 30 '18 17:01 ganeshkantu