You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using pickerInput() a lot to allow the user to either select exactly one of the possible choices or nothing. I've been doing this by setting multiple = TRUE and options = pickerOptions(maxOptions = 1). However, when using the bslib package with bootstrap 5, this does not work anymore, as it is not possible to deselect a selected choice again.
The attached code works as expected when switching back to bootstrap 4 (i.e. bs_theme(version = 4)) or setting maxOptions = 2.
Unfortunately that's a bug in the JavaScript library (reported here) and there's few chances that it'll be fixed.
The only solution I see here is using a workaround with a button to clear selected choices explicitly, using either the allowClear option or the select / deselect all options but hiding the select all one :
Dear shinyWidgets devs,
I've been using
pickerInput()
a lot to allow the user to either select exactly one of the possible choices or nothing. I've been doing this by settingmultiple = TRUE
andoptions = pickerOptions(maxOptions = 1)
. However, when using thebslib
package with bootstrap 5, this does not work anymore, as it is not possible to deselect a selected choice again.The attached code works as expected when switching back to bootstrap 4 (i.e.
bs_theme(version = 4)
) or settingmaxOptions = 2
.I'm using
bslib_0.5.1
,shinyWidgets_0.8.0
andshiny_1.7.5
onR 4.3.1
.Is that something that could be handled on your end or do you think this is an
bslib
issue?The text was updated successfully, but these errors were encountered: