Use this tag for questions related to the reactable package. The reactable package provides functions to create interactive data tables in the R programming language, based on the React Table library and made with reactR.
Questions tagged [reactable]
180 questions
2
votes
1 answer
How to implement expand/collapse rows in HTML table
I would like to make some rows expand on click, i.e. by clicking on the arrow. Is there a way in reactable to add java script code to specific rows? There exists and option for expanding/collapsing all rows on click in reactable (see here), but it…

Julian
- 6,586
- 2
- 9
- 33
2
votes
0 answers
R Reactable - expand by default select groupBy columns
I have a reactable with two groupBy columns. The default is to start with neither column expanded. Using the defaultExpanded = TRUE argument results in both columns expanded. I would like the default to be only the first groupBy column expanded…

Morris Johnson
- 68
- 5
2
votes
1 answer
use solid fontawesome icons in `reactablefmtr::icon_assign()`
In the following example I have the regular version of the fontawesome star icon:
library(dplyr)
library(reactable)
library(reactablefmtr)
tibble(
stars = 1:5
) %>%
reactable(
columns = list(
stars = colDef(
show = TRUE,
…

eastclintw00d
- 2,250
- 1
- 9
- 18
2
votes
1 answer
How to use groupBy and show data from other columns with an R render function or cellInfo from Javascript
I would like to combine reactable's groupBy aggregates with the ability to show information from other cells. For example, I can show/combine information from other columns like so:
library(reactable)
library(dplyr)
library(htmltools)
data <-…

JasonAizkalns
- 20,243
- 8
- 57
- 116
2
votes
1 answer
How to show number of matching entries next to crosstalk checkbox filter?
I'm using checkbox filters from crosstalk to filter entries in a table made with reactable.
I need a simple way to get the checkboxes to show the number of corresponding entries next to them.
Here's a minimal example of a table with checkbox…

Ulrik Lyngs
- 98
- 1
- 5
2
votes
1 answer
how can I change the data in a reactable table inside Rmd using javascript only?
I have created an .qmd file in R which contains a table created using the excellent reactable package.
How can I change the data contained in this table using only javascript?
I know that something similar can be done using crosstalk or shiny, but I…

michael
- 153
- 1
- 11
2
votes
0 answers
How to use `downloadHandler` for download buttons create inside shiny reactable?
I created downloadlinks inside rows of a reactable
I did this for a DT::datatable() and a reactable::reactable()
I also created the respective output downloadHandlers using apply on the ids
For the DT it works , but for the reactable it does…

Lefkios Paikousis
- 462
- 1
- 6
- 12
2
votes
1 answer
Custom and predefined action reactable
Is it somehow possible to have a custom action and using one of the predefined action, e.g. onClick = "select"?
I would like to use the onClick select and an additional JS function.
Example:
onClick = "select" + JS("function(rowInfo, column) {
…

Odrai
- 2,163
- 2
- 31
- 62
2
votes
0 answers
Shiny Reactable highlight selected cell speed
It's possible to conditionally format a selected cell in Reactable's shiny framework by setting two input$ values to the selected cell's data but in the comparison function to then change the format of this cell, it can take a very long time for…

Justin
- 153
- 2
- 10
2
votes
1 answer
Download data into excel from r shiny table created with reactable
I have a shiny dashboard where the tables are created with the reactable package. I have simple and nested tables and as far as I can see, there is only a download option for csv:
library(htmltools)
library(fontawesome)
data <- MASS::Cars93[1:15,…
2
votes
1 answer
Preserve user-specified-sorting during reactable refresh in shiny
I am making a shiny app with a reactable where the user can choose how to sort the table. The trouble is when the table refreshes the sorting goes back to the default sorting specified when the table is created. I want to be able to have the table…

zimia
- 930
- 3
- 16
2
votes
1 answer
How do you render line breaks within cells in an rmd file knitted to html?
I have a dataframe that I created by reading in a csv file that includes line breaks. The line breaks were manually created in Excel with Alt + Enter. When previewing the dataframe, the line break is visible on the hover preview this image from a…

BCovington
- 21
- 5
2
votes
1 answer
R reactable - get a newline in a text column
How do I make reactable display a newline in a text column?
This does not work:
library(reactable)
reactable(
data.frame(text = "test, \n test, \n test")
)

Rob G.
- 395
- 1
- 8
2
votes
1 answer
Interaction between reactable and Leaflet in shiny app (crosstalk, leafletproxy)
My app has a leaflet object and a reactable object which interact via crosstalk.
When the user select a record from the table (using the checkbox), I want the app to add only the corresponding marker (using a different icon) and completely remove…

António
- 43
- 6
2
votes
1 answer
Reactable R - Change the Maximum Number of Rows per Page from 10 to 5
I want to limit the number of rows per page in reactable from 10 to 5.
Here is a reproducible sample
set.seed(250)
df <- tibble(x = sample(x = 1:20))
reactable(df)
Right now, when you run this code, there are two pages of 10 rows each. I want four…

Annelise Dahl
- 65
- 6