-
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
FR: let selectizeInput choose same choice repeatedly. #2939
Comments
It's possible to implement this capability with shiny's reactive programming tools. Sounds like a situation where you want to combine something like |
I don't think this was a question because I can implement this with the programming tools. However, selectizeInput can have a parameter (allowRepeat = FALSE) to let repeated values to be added. That would be a feature improvement and it would allow such input: Currently, I have an observeEvent on a selectInput. Upon selection, the variable name is concatenated to the textInput. |
Oh ok, sorry for misunderstanding the issue! By any chance, does the ability to have repeated labels help you workaround the issue (e.g., |
Question is how many times user will need it? What if it is needed 3 or 5 times? Also it will be ugly to see same item repeated mutliple times in the pop-up list. |
Just as a workaround: You could update the choices after each selection, to always have "one more" available:
|
I wanted to make a formula editor to assist users while writing formulas with variable names. The aim is to let users calculate new variables for a data frame based on existing variables. If there are many variable names, users won't be able to keep those in mind, hence the assist. selectizeInput is almost perfect for this case. It allows predefined items (e.g. VAR1, VAR2, ...., +, /, -, *, sqrt(, log(, lag(, first(, ),....) but it also allows users to add new items, on the go. e.g. user may want to mutliply a variable with an arbitrary number e.g. 12231232.3. This formula can be converted into a string, parsed and evaluated. Only problem is that users can't add same item twice. sqrt(x^2 + y^2) doesn't work since, ^ and 2 appear twice.
I wonder if this makes sense for other users? There maybe other scenarios, where this can be useful (some ordered selection of items for probabilities? e.g. picking multiple identical items from a collection)
The text was updated successfully, but these errors were encountered: