dataface
dataface copied to clipboard
Right-clicking a row should have an "Add row" option to insert mid-table
Option A
- Send an empty insert to the server to get back its primary key.
- Insert that new row into the expected spot in the rows state (when the user refreshes, it will appear at the bottom but that's probably okay)
- Wait until the server responds before rendering, to eliminate the race condition of the user editing the row before a primary key is established
Option B
- Create a row in the state that has a special key, like
_new: true - When saving, check for that special key and do an insert instead