-
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
insertUI: Modal Close/Open resets inserted UI using insertUI & lapply #1590
Comments
This is definitely related to #1588. And the reason your workaround is not working is because saving the number of clicks isn't what's important in your scenario (like it was in #1588). What is important here is retaining the things you actually add to the UI when you click the button (in your example above, this would be the whole With the fix in #1589, this would just work as is (I think). Feel free to try if you want and tell me your thoughts. The problem is that we're not sure yet if that will make it into the master branch or not... As of now, modals simply do not support "persistent use" -- they're kind of meant to be opened once. Your situation is just so unfortunate though... This will might make us reconsider... Anyway, in the meantime, if you can get a small minimal reproducible example, I could try to give you a rough solution that works now... |
Thanks Barbara. That's actually how I handle some of the other inputs on that modal (storing last selections as reactives). I agree that saving the entire fluidRow with all the inputs would be extremely painful. I'll give the fix in #1589 a try and let you know my findings. Any concerns about the travis-ci failure? Would bypassing the modalDialog completely and using |
Don't worry about the Travis failures. That code wouldn't be ready to merge to master (needs documentation, for example), but it's safe for you to try. And yes, if you bypass Shiny modals completely, you shouldn't have this problem. I'm not sure how shinyBS handles modals, but that could be a possibility... |
Closing for now. See #1589 (comment) for details. |
The shinyBS modal functions should be perfect for you @bogdanrau. |
Possibly related to #1588.
I use
insertUI
andremoveUI
to insert dynamic filters in a modalDialog, and each filter has it's own #remove to remove that particular filter. When the modal closes to execute the query, and then is reopened, the filters disappear. The code below shows how these are added and removed. The intent of this is, once a user closes the modal (with anactionButton
that executes the query), and they want to go back and modify, the inserted UI elements should be retained.I tried keeping the
input$addFilter
number of clicks in a reactive value and triggering the observeEvent based on that, but it doesn't seem to work. Is this a limitation in the current implementation ofmodalDialog
or a limitation in my understanding?The text was updated successfully, but these errors were encountered: