How can I delete a row in the AgGrid table?
While defining columns for table, i added a "Delete" button, when i click this button, i want to delete the currently selected row. How can i do this? . Thanks so much
6 Replies
Make the table based on state. Like state.rows. when you click deleted run a frontend script that sets a new state.rows without the row
So, I have to run a background runnable to listen for that change (in state), and then I will call an API to delete it in the database (I'm using Supabase)
Yeah so if you want to persist it to a database. You could run a background task to deleted it from the database then rerun the original query that fetches this state.
Yep, I have an off-topic question, hope you can help me. Where should we store the access token? In the state?
I would check out the hub for good examples of how to do things. You can run supabase as a frontend
Script directly as a background worker not exposing the supabase auth.
https://hub.windmill.dev/integrations/supabase/apps
Thank you very much 🥰