-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Button to Deselect the selected value ? #1449
Comments
No - I recommend using a multiple select with |
But this is not correct solution , As selectAll button will select all the options . |
I also need a dropdown where you can select an option or select none of them. Currently this requires using multiple, otherwise the user can't deselect. Or we have to introduce the action bar which allows the users to deselectAll and selectAll. But how do we get value out of this? Currently I have to do this, to get the single value out of multiple-select element:
Of course, this is all doable, but it shouldn't require so many workarounds to do these things. It also would be useful if we could include only the deselectAll button without the selectAll :) |
+1 for Deselect/Clear button for single selection dropdown. |
+1 for Desect/Clear |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 for Desect/Clear |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
3 years after and this isn't a feature up until now? I tried to insert an element during ready but not all time the element gets inserted, maybe because the generator for selectpicker() was not done yet; However there is no .done() function to extend to selectpicker, so my workwaround was to put this insert to a setTimeout but it feels more a hack rather than proper integration. I also don't get the same result every time, not all the time the element gets inserted even it is a delayed time. Here is my code for adding element: $(function(){ Clear Selection }); Although the above code, may work on adding the element, I couldn't make the clear function work. [EDIT] : I was able to do a work-around but still require setTimeout but for this approach I followed the suggested using of "multiple" with data-max-options="1"
|
+1 pls |
…(for multiple and single selects) (#1449)
This change will be a part of the v1.14.0 release. This issue will be updated after it's made available. How to enable
Demos:
|
…(for multiple and single selects) (#1449)
until the new option is released, u can use the below to target the select with single option only .bootstrap-select {
select[data-max-options='1'] ~ .dropdown-menu .bs-actionsbox {
display: none;
}
} now u have the same behavior as multi selection, keep in mind that this will not auto focus the selected option when the menu opens 👎 . PS PPS |
…(for multiple and single selects) (#1449)
Released in v1.14.0-beta! |
Until allowClear function well is tested. |
3 years and 1.14 is still not released. :o I used input-groups for now to solve this problem:
|
As per documentation , "data-action-box" adds the two button to select all / deselect all button in the header .But this only happens in case of "multiple selection " .
Is there any way to add similar deselect button for single selection dropdown ?
The text was updated successfully, but these errors were encountered: