update_tabler_progress: Update a tabler_progress on the client

Description Usage Arguments Examples

View source: R/tabler.R

Description

Update a tabler_progress on the client

Usage

1
update_tabler_progress(id, value, session = shiny::getDefaultReactiveDomain())

Arguments

id

Progress unique id.

value

New value.

session

Shiny session object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if (interactive()) {
 library(shiny)
 library(shinyWidgets)
 ui <- tabler_page(
  tabler_body(
    noUiSliderInput(
      inputId = "progress_value",
      label = "Progress value",
      min = 0,
      max = 100,
      value = 20
    ),
    tabler_progress(id = "progress1", 12)
  )
 )

 server <- function(input, output, session) {
   observeEvent(input$progress_value, {
     update_tabler_progress(
       id = "progress1",
       input$progress_value
     )
   })
 }
 shinyApp(ui, server)
}

DivadNojnarg/outstanding-shiny-ui-code documentation built on Nov. 2, 2021, 12:03 p.m.