Skip to content

Display the loader after clicking actionButton until the datatable has loaded  #4

Description

@KKulma

It's not really an issue, but specific application question.

I have an app where a user chooses a file name from a drop-down menu (selectizeInput) and confirms the choice with an actionButton. The app will display the results in the DT::dataTableOutput format.

I'd like to be able to show a loading screen (using shinydashboardloader package) but only AFTER a user presses the actionButton. Prior that I'd like to show an empty screen. Additionally, if a user wants to try several files in one session, the loading screen should appear every time the actionButton has been pressed and disappear when the dataset has been loaded.

If I simply use

dashboardBody(
    fluidRow(
      box(h2("My Data"),
      div(style = 'overflow-x: scroll', 
          withLoader(DT::dataTableOutput('mytable'),
                     type = "html",
                     loader = "loader1")),
      width = 12)

  )
  )

The loader appears before the actionButton is pressed and doesn't appear when a user wants to load second, third, etc. file as there's already an output in the main panel from the previous process.
I asked the same question on StackOverflow, got some useful pointers, but I'm not sure if they are relevant to shinycustomloader.

Hope it all makes sense but let me know if not!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions