reactable icon indicating copy to clipboard operation
reactable copied to clipboard

Add columns using javascript API

Open g-pires opened this issue 4 months ago • 1 comments

Hi,

Is there a way to add new columns using the javascript API Reactable.setData ? So far, it only fills rows for which a column was previously initialized in R. I want to be able to add new columns dynamically via JS that were not initialized (for memory problems).

Thank you

g-pires avatar Sep 29 '25 08:09 g-pires

So there's not a nice easy way to do this, especially as columns are defined on the R side. But one possibility, if you know what kind of columns will be added beforehand, is to add empty columns in the data when you first create the data. You can make those columns hidden to begin with, then as you add columns by updating the data, you can then show the columns with the JavaScript API.

glin avatar Oct 06 '25 03:10 glin