shinyWidgets
shinyWidgets copied to clipboard
Add sliderLabel input widget
I had a project where I needed the choices displayed to the user to be character, but the underlying data should remain numeric.
This has been implemented as assuming that choices is a named numeric vector.
Can probably be improved.
Hi!
Interesting idea!
In your version this doesn't return the choices passed by the user :
January should return 1 and not 0.
I think that's possible to do something like you want directly in sliderTextInput using a named list or by adding choicesNames and choiceValues arguments (like in radioButtons, checkboxGroupInput...)
But it will require to change the JavaScript bindings.
Victor
Hi! Interesting idea! In your version this doesn't return the choices passed by the user :
![]()
Januaryshould return1and not0.I think that's possible to do something like you want directly in
sliderTextInputusing a named list or by addingchoicesNamesandchoiceValuesarguments (like inradioButtons,checkboxGroupInput...) But it will require to change the JavaScript bindings.Victor
Agreed, this is an off-by-one bug in my hastily written code - having it as a form of sliderTextInput would be much better but I don't have the skills to do that.