I’m in the middle of building a web to CRUD databases with using data-grid.
I was able to display, create, edit and delete thanks to all the amazing tutorials out there,
but I ran into some roadblocks now.
First, let me explain about database structure I have.
I have Needs table and Need_types table on Supabase.
Needs table has a need_type_id as a foreign key.
When a user wants to create new need item with the form container below , they might want to create a new need_type as well.
It seems like I would be able to achieve that by using “Allow to create option” from Multi-select but I’m not sure how I can bind things correctly.
now, I want to achieve the following:
Insert a new type on Need_type table from Supabase when a user creates the one on the multi-select on the form container.
Create new need on Needs table from Supabase with using the newly created type’s id once it’s submitted.
Please let me know if you need more additional explanation to help.
Thanks in advance for all your help!
Attaching a screenshot below: