reactable
reactable copied to clipboard
Add columns using javascript API
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
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.