Closed Johan-rosa closed 10 months ago
Have you read the Contributing Guidelines?
Issue #25
number_extra
numberExtras
Run this example and play with the numbers
library(shiny) library(reactable) library(reactable.extras) string_list <- function(values) { paste0( "{", paste0(names(values), " : ", unlist(values), collapse = ", "), "}" )} ui <- fluidPage( reactable_extras_dependency(), reactableOutput("react"), textOutput("number_text"), textOutput("text") ) server <- function(input, output, session) { output$react <- renderReactable({ tibble::tibble( name = c("Portfolio 1", "Portfolio 2", "Portfolio 3"), expected_return = c(0.0687, 0.060, 0.050) * 100, expected_volatility = c(0.1575, 0.140, 0.120) * 100 ) |> reactable( columns = list( name = colDef(cell = text_extra("text")), expected_return = colDef(cell = number_extra("number", class = "number-extra")) ) ) }) output$text <- renderText({ req(input$text) values <- input$text paste0( "Text: ", string_list(values) ) }) output$number_text <- renderText({ req(input$number) values <- input$number paste0( "Text: ", string_list(values) ) }) } shinyApp(ui, server)
I cannot see number_extra() working yet. Is this function still yet to be released?
Have you read the Contributing Guidelines?
Issue #25
Changes description
number_extra
function and its js wrappernumberExtras
were addedHow to test
Run this example and play with the numbers