Hello, I want to make a scroll in my Shiny app at the bottom of the screen after a fileInput, but the runjs code runs only the second time as I ve upload the file . (but not the first time)
UI
column(12,
fluidRow(
column(width = 6,align="center",
h4("Data second table"),
fileInput("dataFile2",label = NULL,
buttonLabel = "Browse...",
placeholder = "No file selected",
multiple = FALSE,
)),
bottom of the UI
tags$div(id="bottom", "I'm at the bottom, javascript can scroll me into view"),
Server
observeEvent(input$dataFile2, {
cat(file=stderr(), "Debug on appel l'ouverture de selection de fichier", "\n")
# js$refocus("downloadDataCSV")
runjs('document.getElementById("bottom").scrollIntoView();')
})