Replies: 1 comment
-
Hi @DCH1980 ! i have face the same problem. To achieve this, you can : 1- In your column array that you pass into react table you need to create a button who's onClick function takes a callback to edit your data to add an
2-In your
3- Create a
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone -- Beginner ish here.

Overview: I'm trying to use the editable cell example in my application to update data in my database. I am able to retrieve and display the initial data. Cells are editable. I'm following this example. My 'real' db has many more entries but it was a lot to look at so I broke it down into something easier to see and maybe understand (hah).
Stack: Next.js, Prisma, postgres db.
I struggled with posting all the code b/c it's a lot but here we are. --May cross post to stackoverflow.
Problem: but I'm having a hard time wrapping my head around how I can modify the updateMyData function to update my database.
So I'm guessing that I need to modify updateMyData and/or create a new function for updating the data through prismaClient. My efforts haven't been successful and although I know setData is where it's supposed to be I do not think I understand what's going on with the mapping in setData. I have looked deeper into the react-table code but at this point in my understanding it's over my head.
Thanks in advance and let me know if I can clarify anything -- happy to do that.
Function I'm focusing on:
My code
Beta Was this translation helpful? Give feedback.
All reactions