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

Possible bug in getting the currently selected tab in a gadget using miniTabstripPanel #5

Open
daattali opened this issue Feb 18, 2016 · 6 comments

Comments

@daattali
Copy link

For some reason I can't seem to figure out how to get the value of the selected tab in a shiny gadget. I thought it'd be straight forward, but this isn't working. Not sure if there's a bug, or if I'm missing something.

library(shiny)
library(miniUI)

ui <- miniPage(
  miniTabstripPanel(
    id = "mytabs",
    miniTabPanel("Tab 1", value = "tab1", "tab 1"),
    miniTabPanel("Tab 2", value = "tab2", "tab 2"),
    miniTabPanel("Tab 3", value = "tab3", "tab 3")
  )
)

server <- function(input, output, session) {
  observe({
    cat(input$mytabs)
  })
}

runGadget(ui, server)
@qinzhu
Copy link

qinzhu commented Dec 29, 2016

It seems the CRAN version of this package still has this bug. Also for the dev version, the value argument for miniTabPanel seems useless, the title is always the return value.

@daattali
Copy link
Author

@bborgesr you can take a look if you want :)

@vnijs
Copy link

vnijs commented Jun 24, 2017

Although it would be indeed be nice to be able to set a value for a tab panel as @daattali and @qinzhu requested, I'd be happy to get the dev version on CRAN. The current release doesn't seem to provide any return value for a tab

@wcmbishop
Copy link

It looks like this is still an issue. I can't seem to get the id field to work with miniTabstripPanel to identify the active tab.

Did anyone find a workaround for identifying the active tab?

@zx8754
Copy link

zx8754 commented Nov 29, 2017

@alistaire47
Copy link

This still doesn't behave how its docs say it does. Using the full name (even with spaces) does work, though.

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

6 participants