shiny
shiny copied to clipboard
Feature Request: allow selectizeInput to be passed HTML
In light of a recent PR (https://github.com/rstudio/shiny/pull/1521), Winston and I were talking that it may be nice to allow a similar thing for selectizeInput(). This would entail two things:
-
allowing users to pass two args (
choiceNamesandchoiceValues), instead of one (choices). We may do this in #1521 still, so that the APIs for constructingradioButtons,checkboxGroupInputandselect(ize)Inputlook similar and consistent. -
allowing the
choiceNamesargument toselectizeInput(does not apply toselectInput) be a list whose elements can be arbitrary HTML/tags objects.
For example, it would be nice to allow users to do something like this.
That kind of customization would be very helpful indeed.
Has there been any progress on that one?
You can use my package shinySelect for that. It is on CRAN.
Thank you @stla , shinySelect is beautiful!
Is there a way to make it support a large number of choices? selectizeInput can't handle well thousands of choices for example.
@GitHunter0 If your only issue with selectizeInput is wanting it to scale better, have you tried "server-side selectize" mode? https://shiny.rstudio.com/articles/selectize.html#server-side-selectize It's great for searching among thousands of choices (but I think you can only browse the first 1000 or so).
Thank you @jcheng5 , I have tried but it gets slow and freezy really fast as the choices increase. Ideally, I would like it to handle hundreds of thousands. Thankfully, shinyvs was launched to do this hard work.
I asked about shinySelect , because it would be great to combine in one component layout flexibility and scalability.