-
Notifications
You must be signed in to change notification settings - Fork 15
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
Buttons updating tabs or panes do not update the input value #172
Comments
I still don't know how to do that or if there any solution but I've found other open issues that mention it, as #166 , that I did not see when posting. |
Hello @gabrifc, I am glad to hear yonder's been of use to you. The first issue is a conflict between bootstrap 3 and 4. In your first app there are no yonder components, so shiny's bootstrap 3 resources are loaded. In the second and third examples including Yonder was designed to allow any observer to hide or show nav panes. You are doing exactly this by using a nav input and action buttons to toggle between nav panes. However, showing or hiding a nav pane has no reverse propagation effect. Instead, any observers must update any additional inputs affecting the nav panes. So, in your third example the button input observers must update the selected value of the nav input. Here are the modified observers, observeEvent(input$to_QC, {
updateNavInput(id = "gene_reads", selected = "gene_reads_QC")
showNavPane("gene_reads_QC")
})
observeEvent(input$to_preview, {
updateNavInput(id = "gene_reads", selected = "gene_reads_preview")
showNavPane("gene_reads_preview")
})
observeEvent(input$to_EDA, {
updateNavInput(id = "gene_reads", selected = "gene_reads_EDA")
showNavPane("gene_reads_EDA")
}) Did I leave anything out or explain anything confusingly? The yonder approach is more verbose at times. As you may have seen in #166 I am working to eliminate some of this verbosity. In version 1.0.0 you will be able to assign actions to a reactive input, such as show a nav pane. With these actions you will no longer need the calls to I hope this answers your current questions and if you have any new questions or clarifications on this subject feel free to re-open this issue. If anything new came up feel free to open another issue. |
Hi, To be honest, I don't really understand why I did not use the Thank you very much for the detailed and careful response. Everything makes sense. |
Hi! First of all, thanks for developing
yonder
. It is a joy to use and have used it in many projects. Here is my current problem:Externally updating tabs or navigation panes does not update the value reported by the input, despite the changing the tab. This prevents using conditional statements that depends on whih tab is active at the moment.
Example 1: Updating a
tabsetPanel
via externalactionButton
withoutyonder
. The value ofinput$gene_reads
is updated when theactionButton
is clicked.Example 2: Updating a
tabsetPanel
via externalactionButton
withyonder
. The value ofinput$gene_reads
is NOT updated when theactionButton
is clicked, despite changing the tab. This is the exact same app, but uncommented thecolumns
statement to forceyonder
to load.Example 3: Updating a
navInput
via externalactionButton
orbuttonInput
withyonder
. I seem to recall that in the documentation it used to say to usenavInput
/navContent
andbuttonInput
instead ofactionButton
. This is the same app, but changed thetabsetPanel
tonavInput
/navPane
andactionButton
tobuttonInput
. As with example 2, The value ofinput$gene_reads
is NOT updated when the button is clicked, despite changing the tab. It does update when using thenavInput
menu, though.Is this expected? Is there any workaround? I have looked at the documentation extensively (including the previous releases) but cannot find anything about it.
Again, thank you very much for your work.
The text was updated successfully, but these errors were encountered: