-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added remove single for remove plugin #848
Conversation
a loving +1 on this. it'd be a great addition. |
+1, this would be fantastic |
Any progress? |
Still waiting for now |
+1 |
Original issue in #665 |
Plugin removeButton: Make it work with single option mode
Hi @joallard , thanks for the merge of this PR! Will you make a new release with the updated dist files to make this feature easily integrated? |
Good point, I'll discuss releasing with @brianreavis |
Thanks @joallard ! |
I am having problems with this. While with a multi Selectize the plug-in works correctly, it doesn't when having a single Selectize (in my specific case is a multiple + maxItems:1). Any suggestion? Am I maybe missing something? |
@Pictor13 did you have any luck with this issue? I'm experiencing the same thing. |
@thiagomorato No actually I am still looking into it (but don't know if I'll have soon the time to properly fix it). Anyway, the issue resides in the render method that always returns Another thing that I noted is that, when setting
No idea what is happening here; even less how it has been thought and how it is supposed to work. I don't want to change stuff if I am not sure about the side-effects. Did you find something more about it? |
Oook, I just found a fix that works for my case: First, just copy paste the same append function from multiClose into singleClose. This fixes the not appearing "remove_button", making it render inside the "item" element, instead that as adjacent element! Additionally, I changed the line 3716 in:
because I want the possibility to pass my custom classname, instead of being forced to the "remove-single" (in my case I actually don't care of the difference between 'multi' and 'single', when styling the remove button). I also found that there was another pull-request with a more clear code: My changes fix the issue, but am not really sure why a different append function was being used in the first place, so I can't assume that my changes are correct. Eventually I can create a pull request, but it should be reviewed to avoid it to break something else. |
Remove button wasn't rendering for me in single mode. I can confirm copy-pasting |
I just ran into this myself. Thank you @Pictor13 for the workaround. Any reason why this hasn't been fixed? |
Because I made a mess with my commits, and I didn't take the time to tidy things up 😛
Please @bram1028 let me know if that fixes correctly also for you. I reviewed my code changes again, but a confirmation always feels better 😁 |
I was missing the single mode remove button as well, but copy-pasting the Edit 1: However, I can only remove the selection without the dropdown being open. When dropdown is visible a click on the remove button only closes the dropdown. Edit 2: When dropdown is open, an
to
in the |
Hi, i am reopening this pull request for the single close plugin.
Hope its fine now