show_tabler_dropdown: Show a tabler_dropdown on the client

Description Usage Arguments Examples

View source: R/tabler.R

Description

Show a tabler_dropdown on the client

Usage

1
show_tabler_dropdown(id, session = getDefaultReactiveDomain())

Arguments

id

Dropdown id.

session

Shiny session

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
if (interactive()) {
 ui <- tabler_page(
  tabler_navbar(
    brand_url = "https://preview-dev.tabler.io",
    brand_image = "https://preview-dev.tabler.io/static/logo.svg",
    nav_menu = NULL,
    tabler_dropdown(
      id = "mydropdown",
      title = "Dropdown",
      subtitle = "click me",
      tabler_dropdown_item(
        id = "item1",
        "Show Notification"
      ),
      tabler_dropdown_item(
        "Do nothing"
      )
    )
  ),
  tabler_body(
    tabler_button("show", "Open dropdown", width = "25%"),
    footer = tabler_footer(
      left = "Rstats, 2020",
      right = a(href = "https://www.google.com")
    )
  )
 )
 server <- function(input, output, session) {

   observeEvent(input$show, {
     show_tabler_dropdown("mydropdown")
   })

   observeEvent(input$item1, {
     showNotification(
       "Success",
       type = "message",
       duration = 2,

     )
   })
 }
 shinyApp(ui, server)
}

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