Closed micahwilhelm closed 3 years ago
Thanks @micahwilhelm for reporting that. I had a first look, but indeed this error looks a bit mysterious to me. I'll keep you updated once I figure that out.
Hi @micahwilhelm thank you for using the package and reporting the issue! In version 0.2.0
when the t
method is run within a session it tries to retrieve the i18n-state
input from the session (which can only be done within a reactive consumer for example reactive
or observe
).
In order to show the modal once the app is loaded you can use the ignoreNULL = FALSE
argument of observeEvent
which will cause the observer to run on startup (more info on the option is available here: https://shiny.rstudio.com/reference/shiny/1.5.0/observeEvent.html in the ignoreNULL and ignoreInit section)
observeEvent(input$show, {
dataModal()
}, ignoreNULL = FALSE)
Please let me know if the described solution helps! :)
Hi there,
I've been using the shiny.i19n package (v0.1.0) to translate the app into multiple languages. However, after updating to v0.2.0 translations in a modal (that is shown once loading the app is finished) causes my app to crash. My app needs to shows a tutorial modal once the app is loaded. Any advice?
See my minimal, reproducible example below:
Works in v0.1.0 not in v0.2.0:
Gives error: