Guidelines
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
When using reactable.extras in a Shiny app, sorting by a single column in UI works correctly. However, when attempting to sort by multiple columns using Shift-click, the app throws the following error:
Warning: Error in rlang::sym: Can't convert a character vector to a symbol.
55: <Anonymous>
54: signalCondition
53: signal_abort
52: abort
51: abort_coercion
50: rlang::sym
49: ::
shiny
observe
48: <observer>
1: runApp
Steps to reproduce
- Run a Shiny app with reactable_extras_server displaying any simple data frame.
- Click on a column header (e.g., column1) to sort.
- Hold the Shift key and click on a second column header (e.g., column2) to add it to the sort.
- The app immediately crashes with:
Error in rlang::sym: Can't convert a character vector to a symbol.
Using defaultSorted with multiple columns:
- In your reactable_extras_server call, add:
defaultSorted = list("column1" = "desc", "column2" = "desc")
- Run the Shiny app.
- The app immediately crashes on startup with:
Error in rlang::sym: Can't convert a character vector to a symbol.
Expected behavior
Shift-clicking to sort by multiple columns should work as it does in reactable, allowing the table to sort by multiple columns without errors.
Attachments
library(shiny)
library(reactable.extras)
library(data.table)
ui <- fluidPage(
reactable_extras_ui("table")
)
server <- function(input, output, session) {
data <- data.table(
column1 = sample(letters, 100, TRUE),
column2 = sample(LETTERS, 100, TRUE),
column3 = rnorm(100)
)
reactable_extras_server(
"table",
data = data,
filterable = TRUE,
sortable = TRUE
# Same error if you add:
# defaultSorted = list("column1" = "desc", "column2" = "desc")
)
}
shinyApp(ui, server)
Screenshots or Videos
No response
Additional Information
The same error occurs when defining the reactable parameter defaultSorted with more than one column, for example:
defaultSorted = list("column1" = "desc", "column2" = "desc")
This setup immediately triggers the same rlang::sym error on app startup.
Guidelines
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
When using reactable.extras in a Shiny app, sorting by a single column in UI works correctly. However, when attempting to sort by multiple columns using Shift-click, the app throws the following error:
Steps to reproduce
Error in rlang::sym: Can't convert a character vector to a symbol.Using defaultSorted with multiple columns:
defaultSorted = list("column1" = "desc", "column2" = "desc")Error in rlang::sym: Can't convert a character vector to a symbol.Expected behavior
Shift-clicking to sort by multiple columns should work as it does in reactable, allowing the table to sort by multiple columns without errors.
Attachments
Screenshots or Videos
No response
Additional Information
The same error occurs when defining the reactable parameter defaultSorted with more than one column, for example:
defaultSorted = list("column1" = "desc", "column2" = "desc")This setup immediately triggers the same rlang::sym error on app startup.