Skip to content
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

Add "id" to access more than one shinyalert in a App #11

Closed
gsrnivas opened this issue Feb 19, 2018 · 2 comments
Closed

Add "id" to access more than one shinyalert in a App #11

gsrnivas opened this issue Feb 19, 2018 · 2 comments

Comments

@gsrnivas
Copy link

I am using shinyalrert more than once and I would prefer to use id's to refer to different alerts. The second one overwrites the first one and there is no chance to get both without storing them to a reactive value variable. It would be great if you considering adding this. Thank you.

@daattali
Copy link
Owner

That makes sense. You could also use the callbackR parameter to get the value instead of using input$shinyalert. I actually prefer using callbacks in this case because with the input version, there are problems you can come across. If two consecutive modals have the exact same value, then the second one won't trigger the input value since it hasn't changed (similar to this issue). But I can look into potentially adding an extra parameter where you can specify the name of the input, where shinyalert is the default

@daattali
Copy link
Owner

daattali commented Mar 1, 2018

@gsrnivas I've implemented this feature, using a new inputId parameter. Please try it out and let me know if that's what you had in mind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants