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( ...@@ -104,7 +104,7 @@ shinyServer(
dig <- sapply(a, howmanydigits) dig <- sapply(a, howmanydigits)
print(xtable(a, digits = c(0, dig)), type = "html") print(xtable(a, digits = c(0, dig)), type = "html")
} else { } else {
cat("Selecione o conjunto de dados") cat("Selecione o conjunto de dados.")
} }
}) })
...@@ -120,24 +120,36 @@ shinyServer( ...@@ -120,24 +120,36 @@ shinyServer(
quote = FALSE) quote = FALSE)
}) })
## Para fixar a aba selecionada
aba <- reactiveValues(x = "datasets")
observeEvent(input$TAB, {
aba$x <- input$TAB
})
output$TABLE_DOC <- renderUI({ output$TABLE_DOC <- renderUI({
test <- input$DATASET == "" & is.null(input$OBRA) & test <- input$DATASET == "" & is.null(input$OBRA) &
is.null(input$KEYS) is.null(input$KEYS)
if (length(test) == 0) {
includeMarkdown("ABOUT.md")
} else {
if (test) { if (test) {
tagList( return(includeMarkdown("ABOUT.md"))
hr(),
includeMarkdown("ABOUT.md")## ,
## dataTableOutput("DATATABLE")
)
} else { } else {
tabsetPanel( tabsetPanel(
id = "TAB",
selected = aba$x,
tabPanel("Lista de Datasets", tabPanel("Lista de Datasets",
dataTableOutput("DATATABLE")), dataTableOutput("DATATABLE"),
tabPanel("Documentação", uiOutput("DOC")), value = "datasets"),
tabPanel("Documentação",
uiOutput("DOC"),
value = "doc"),
tabPanel("Tabela de dados", tabPanel("Tabela de dados",
tableOutput("TABLE")) tableOutput("TABLE"),
value = "tabela")
) )
} }
}
}) })
observe({ observe({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment