-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Custom label and html display in server-side selectize elements #2172
Milestone
Comments
Adding this to the 1.2 milestone as it looks like an unintended regression. |
jcheng5
added a commit
that referenced
this issue
Sep 25, 2018
Fixes #2192. Two problems here: 1. It's not documented but apparently we supported data frames for choices in updateSelectInput/updateSelectizeInput (it doesn't appear to work correctly for selectInput/selectizeInput though). This was used in 023-optgroup-server as well as by the user who reported #2172. 2. The example in 023-optgroup-server was also counting on the default value of optgroupLabelField, which (starting post-Shiny v1.1) was being set to a new default of "group". That now won't happen unless optgroupField is also blank. I'm less confident about the ramifications of this change. The selectize docs with the relevant bits are here: https://github.com/selectize/selectize.js/blob/master/docs/usage.md#data_searching
jcheng5
added a commit
that referenced
this issue
Sep 25, 2018
Fixes #2192. Two problems here: 1. It's not documented but apparently we supported data frames for choices in updateSelectInput/updateSelectizeInput (it doesn't appear to work correctly for selectInput/selectizeInput though). This was used in 023-optgroup-server as well as by the user who reported #2172. 2. The example in 023-optgroup-server was also counting on the default value of optgroupLabelField, which (starting post-Shiny v1.1) was being set to a new default of "group". That now won't happen unless optgroupField is also blank. I'm less confident about the ramifications of this change. The selectize docs with the relevant bits are here: https://github.com/selectize/selectize.js/blob/master/docs/usage.md#data_searching
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the current shiny CRAN version, it's possible to specify values, labels, and displayed html for server-side selectize elements separately. As described in
https://shiny.rstudio.com/articles/selectize.html
Looks like this option was dropped in the current github version, which would be a pity. Here's an example working with the CRAN version:
The dev version seems to interpret the choices as list and tries to group according to the column names (which is the documented behavior). One could specify some HTML as names(choices) and use a custom render function to display this (item.label). However, the escaped HTML is then also shown as label...
Is there a way to get back to the old behavior or to specify more data (columns) which could be used in the render function to generate HTML?
Thanks
The text was updated successfully, but these errors were encountered: