Update deleting rows from views

This commit is contained in:
Andrew Kingston 2023-08-14 16:20:16 +01:00
parent 4bfa0d8cb0
commit 123be842fb
1 changed files with 6 additions and 2 deletions

View File

@ -33,8 +33,12 @@ export const createActions = context => {
}
const deleteRows = async rows => {
await API.viewV2.deleteRows({
viewId: get(datasource).id,
// Ensure we delete _viewId from rows as otherwise this throws a 500
rows?.forEach(row => {
delete row?._viewId
})
await API.deleteRows({
tableId: get(datasource).id,
rows,
})
}