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

Enable reactableOutput to be used in shiny.fluent #212

Closed
Patrikios opened this issue Dec 4, 2023 · 2 comments
Closed

Enable reactableOutput to be used in shiny.fluent #212

Patrikios opened this issue Dec 4, 2023 · 2 comments

Comments

@Patrikios
Copy link

Motivation

library(shiny.fluent)
library(reactable)

if (interactive()) {
  options <- list(
    list(key = "A", text = "Option A"),
    list(key = "B", text = "Option B"),
    list(key = "C", text = "Option C")
  )
  
  shinyApp(
    ui = div(
      Stack(
        tokens = list(childrenGap = 20),
        Dropdown.shinyInput("dropdown", value = "A", options = options#, dropdownWidth = 500
                          )
      ),
      textOutput("dropdownValue"),
      reactableOutput("r1"),
    ),
    server = function(input, output) {
      output$dropdownValue <- renderText({
        sprintf("Value: %s", input$dropdown)
      })
      
      output$r1 <- renderReactable(mtcars)
    }
  )
}

Feature description

Would be nice to have reactableOutputs to partake in shin.fluent framework.

Implementation ideas

No response

Impact

No response

Comments

Some packages are allowed, like leaflet, some are not, as they probably need proper wrapping around react componects.

@timelyportfolio
Copy link

@Patrikios I believe this works with one minor change in your example.

output$r1 <- renderReactable({ reactable(mtcars) })

@Patrikios
Copy link
Author

Of course, my bad, wonderfull, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants