问题
I want to create a datatable from this dataframe:
df1 <- data.frame(
brand = c("Brand 1", "Subbrand 1.1", "Subbrand 1.2", "Brand 2", "Subbrand 2.1", "Subbrand 2.2"),
sales = 100 * 1:6
)
The brands should be parent rows and the subbrands child rows which should be hidden in the beginning. On click on a parent rows its subbrands should be shown. This must work without shiny as I want to integrate it into a HTML-flexdashboard.
I think to solve this I will need a callback like in this example but with the child rows fully integrated into the table.
Any help appreciated.
来源:https://stackoverflow.com/questions/64935253/toggle-hide-show-child-rows-in-datatable-without-shiny