How to make columns sticky for a nested table using reactable

  Kiến thức lập trình

I’m trying to display a nested table using the reactable package. I’d like to have the first column be sticky, for both the main table and the table in the expandable rows. However, I’m not able to get the columns in the nested tables to be sticky for horizontal scrolling (just the columns in the main table). Below is sample code:

library(reactable)

reactable(MASS::Cars93, 
          details = function(index) {
            if (index %in% c(3, 5)) {
              reactable(MASS::Cars93,
                        columns = list(
                          Manufacturer = colDef(
                            sticky = "left")))}},
          columns = list(
            Manufacturer = colDef(
              sticky = "left")))

Any help would be much appreciated!

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT