Skip to content
Snippets Groups Projects
Commit 1232f038 authored by Eduardo E. R. Junior's avatar Eduardo E. R. Junior
Browse files

Corrige o restart das abas

parent 53fd0ee4
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ shinyServer(
dig <- sapply(a, howmanydigits)
print(xtable(a, digits = c(0, dig)), type = "html")
} else {
cat("Selecione o conjunto de dados")
cat("Selecione o conjunto de dados.")
}
})
......@@ -120,23 +120,35 @@ shinyServer(
quote = FALSE)
})
## Para fixar a aba selecionada
aba <- reactiveValues(x = "datasets")
observeEvent(input$TAB, {
aba$x <- input$TAB
})
output$TABLE_DOC <- renderUI({
test <- input$DATASET == "" & is.null(input$OBRA) &
is.null(input$KEYS)
if (test) {
tagList(
hr(),
includeMarkdown("ABOUT.md")## ,
## dataTableOutput("DATATABLE")
)
if (length(test) == 0) {
includeMarkdown("ABOUT.md")
} else {
tabsetPanel(
tabPanel("Lista de Datasets",
dataTableOutput("DATATABLE")),
tabPanel("Documentação", uiOutput("DOC")),
tabPanel("Tabela de dados",
tableOutput("TABLE"))
)
if (test) {
return(includeMarkdown("ABOUT.md"))
} else {
tabsetPanel(
id = "TAB",
selected = aba$x,
tabPanel("Lista de Datasets",
dataTableOutput("DATATABLE"),
value = "datasets"),
tabPanel("Documentação",
uiOutput("DOC"),
value = "doc"),
tabPanel("Tabela de dados",
tableOutput("TABLE"),
value = "tabela")
)
}
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment