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

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

Open
KKulma opened this issue May 29, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@KKulma
Copy link

KKulma commented May 29, 2018

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!

@emitanaka
Copy link
Owner

Sorry I did not realise there were issues open. I will look into this.

@emitanaka emitanaka added the bug Something isn't working label Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants