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

fab_position = "bottom-left" removes logout button #123

Closed
FreyGeospatial opened this issue Oct 13, 2021 · 2 comments · Fixed by #127
Closed

fab_position = "bottom-left" removes logout button #123

FreyGeospatial opened this issue Oct 13, 2021 · 2 comments · Fixed by #127

Comments

@FreyGeospatial
Copy link

FreyGeospatial commented Oct 13, 2021

Use "test" for username and password to enter the app. Logout button does not appear in Chrome, Firefox, or Edge. Commenting out fab_position = "bottom-left" makes the button re-appear in the default bottom-right position.

if (interactive()) {
  library(shiny)
  library(DT)
  library(shinymanager)
  library(bs4Dash)
  
  credentials <- data.frame(
    user = c("test"),
    password = c("test"), 
    stringsAsFactors = FALSE
  )
  
  shinyApp(
    ui = secure_app(fab_position = "bottom-left",
      dashboardPage(
      
      header = dashboardHeader(),
      sidebar = dashboardSidebar(),
      body = dashboardBody(
        
        fluidRow(column(12, DT::dataTableOutput('mytable')))
      ),
      footer = dashboardFooter()
    )),
    server = function(input, output) {
      result_auth <- secure_server(check_credentials = check_credentials(credentials))
      output$mytable <- DT::renderDataTable(iris,
                                            #extensions = "FixedHeader",
                                            #style="bootstrap",
                                            options = list(
                                              dom = 't',
                                              lengthMenu = c(50, 100),
                                              pageLength = 20,
                                              scrollX=TRUE,
                                              autoWidth = TRUE,
                                              paging=TRUE,
                                              searching=FALSE,
                                              ordering=TRUE
                                              #fixedHeader = TRUE,
                                            ))
    }
  
  )
}
@pvictor
Copy link
Collaborator

pvictor commented Oct 13, 2021

Thanks for the example. It seems that the button is hidden by the sidebar, you can make it appear by adding :

tags$style(".mfb-component--bl {z-index: 9999;}")

in your UI (inside dashboardBody() for example).

We will update our own CSS to fix the problem in next release.

Victor

@FreyGeospatial
Copy link
Author

Sweet, thanks for the quick follow-up! Happy to have brought this to your attention.

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

Successfully merging a pull request may close this issue.

2 participants