You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
simply changing the update call to: updateReactable("table", data = as.data.frame(mx))
seems to result in a correct update, but the documentation suggests that the data argument can accept a matrix.
Also, updating the matrix without the colDef specification for the .rownames column in the initial render function causes the row names to be dropped from the rendered table. This happens regardless of whether in input and/or update is a matrix or data.frame.
The text was updated successfully, but these errors were encountered:
Thanks for the report and repro. Internally, matrices are handled by just running as.data.frame() on them, and row names are done by appending them to the data frame as a new column. Both of these are missing from updateReactable(). Matrices should be fairly straightforward to fix but row names are trickier. updateReactable() might have to take a rownames argument as well, for lack of a way to know whether the original table had rownames. Or always add the row names, which isn't super ideal, hmm.
It looks like the updateReactable function does not properly preserve matrix dimensions. Here is a toy example:
simply changing the update call to:
updateReactable("table", data = as.data.frame(mx))
seems to result in a correct update, but the documentation suggests that the data argument can accept a matrix.
Also, updating the matrix without the colDef specification for the
.rownames
column in the initial render function causes the row names to be dropped from the rendered table. This happens regardless of whether in input and/or update is a matrix or data.frame.The text was updated successfully, but these errors were encountered: