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
If I create a selectizeInput with repeating characters in a choice value (in the example "aa aa"), and search for the entire choice value (by clicking the selectize, hitting backspace and type), the highlight functionality seems to break the dropdown, and shows the choice only partially (in the example "a")
Type ab ab. Or type ab a and hit space again. Or a ab. Values don't seem to change, but all choices in client-side display becomes truncated based on the character match when anything is repeated as you type. I don't know the source of this or what version of shiny or selectize it may have crept in but it makes choice lists with any somewhat repetitive multi-word phrases unusable.
Going with the tagged releases, I have to revert back to shiny v1.1.0 to see the problem go away. It occurs from 1.2.0 onward.
Interestingly, the issue where the yellow highlighting gets stuck on options text after you clear or make selections also goes away prior to v1.2.0.
But perhaps this is related to an included version of selectize.js. I don't have time to dig further. But reverting back to shiny 1.1 is too much of a rollback imo to get around this issue unfortunately.
I can confirm using inlcudeScript() in ui.R to load a copy of v0.12.1 after 0.12.4 is a sufficient workaround for the problem if it's needed immediately.
Just want to update that this is still an issue, but the temporary workaround I noted above of overriding with selectize.js v0.12.1 will no longer work with Shiny v1.6.0, requiring to stay on Shiny 1.5.0. (You will get a JS error because selectize-plugin-a11y won't be found.)
Therefore the choice is to stick to Shiny 1.5.0 or to accept the above selectize behavior.
Unfortunately this issue of text being stripped from menu items as you type in the search box is an easy problem to encounter especially for sizable lists with options that are similar, contain multiple space-delimited words, etc. Users find it jarring and there is pressure to not update Shiny beyond 1.5 as a result.
@ngiangre You have to use Shiny v0.1.5.0 and load selectize.js v0.12.1. It's the latter that's key, but you won't be able to use this older selectize version with a newer version of Shiny due to other confllicts.
Activity
leonawicz commentedon Sep 22, 2020
Whether single- or multi-select, I can reproduce this with any set of choices. There does not need to be repeating text within a choice.
selectInput("x", NULL, c("aba", "abb", "abc"), multiple = TRUE)Type
ab ab. Or typeab aand hit space again. Ora ab. Values don't seem to change, but all choices in client-side display becomes truncated based on the character match when anything is repeated as you type. I don't know the source of this or what version of shiny or selectize it may have crept in but it makes choice lists with any somewhat repetitive multi-word phrases unusable.leonawicz commentedon Sep 22, 2020
Going with the tagged releases, I have to revert back to shiny v1.1.0 to see the problem go away. It occurs from 1.2.0 onward.
Interestingly, the issue where the yellow highlighting gets stuck on options text after you clear or make selections also goes away prior to v1.2.0.
But perhaps this is related to an included version of selectize.js. I don't have time to dig further. But reverting back to shiny 1.1 is too much of a rollback imo to get around this issue unfortunately.
wch commentedon Sep 22, 2020
A reproducible example:
wch commentedon Sep 22, 2020
I've bisected it to 6b60580, where we upgraded to Selectize 0.12.4.
That also appears to be the latest official release. There are subsequent versions, 0.12.5 and 0.12.6, but those aren't tagged as releases.
leonawicz commentedon Sep 22, 2020
I can confirm using
inlcudeScript()in ui.R to load a copy of v0.12.1 after 0.12.4 is a sufficient workaround for the problem if it's needed immediately.leonawicz commentedon Jan 27, 2021
Just want to update that this is still an issue, but the temporary workaround I noted above of overriding with selectize.js v0.12.1 will no longer work with Shiny v1.6.0, requiring to stay on Shiny 1.5.0. (You will get a JS error because
selectize-plugin-a11ywon't be found.)Therefore the choice is to stick to Shiny 1.5.0 or to accept the above selectize behavior.
Unfortunately this issue of text being stripped from menu items as you type in the search box is an easy problem to encounter especially for sizable lists with options that are similar, contain multiple space-delimited words, etc. Users find it jarring and there is pressure to not update Shiny beyond 1.5 as a result.
ngiangre commentedon Sep 7, 2021
I also have this issue. I can reproduce it at this site https://shiny.rstudio.com/gallery/selectize-examples.html. Type 'al al' in the second input. Reverting back to shiny_1.5.0 does not fix this behavior for me though. Any advice for a workaround would be appreciated!
leonawicz commentedon Sep 16, 2021
@ngiangre You have to use Shiny v0.1.5.0 and load selectize.js v0.12.1. It's the latter that's key, but you won't be able to use this older selectize version with a newer version of Shiny due to other confllicts.