Skip to content

updateProgressBar generates JS errors #656

@TrainedMusician

Description

@TrainedMusician

When running updateProgressBar on a progressBar where total is not set, the following error appears:

If you do initialize total no errors are generated, but you're stuck with the progress-number div in the top right corner. Both updateProgressBar calss work as intended.

Minimum working example:

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
	progressBar(id = 'bar', value = 0L)
)

server <- function(input, output, session) {
	observe({
		invalidateLater(1000L, session)
		updateProgressBar(session = session, id = 'bar', value = sample.int(100L, 1L))
	})
}

shinyApp(ui, server)

When running this app, inspect element and open the Console log to see a new error being generated on every update (every second). When adding total = 4L to line 5, all errors are gone!

If more information is needed, please let me know

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions