How do I add a new column and / or rename an existing one? #302
-
Hello, I'm trying to build something similar to the data grid that's used in the Glideapps production app and I'm unable to implement adding new columns and renaming existing columns. I'm storing the column data via useState, but any time I make changes the app keeps crashing. This is the error I'm using |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Without seeing your code it is hard to see what could be going wrong. To me this looks like you have messed up the dependencies of one of your hooks but that is honestly just a wild guess here. In particular what appears to be happening is a |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response Jason, |
Beta Was this translation helpful? Give feedback.
-
By the way the @glideapps/glide-data-grid-source package contains a prebuilt hook called |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for you help Jason! |
Beta Was this translation helpful? Give feedback.
Thanks for your response Jason,
I've made a copy of my demo code on CodeSandbox. The issue is probably with the
onAddCol
on line146
.