1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00

Add output context to duplicate row action

This commit is contained in:
Andrew Kingston 2021-12-09 16:29:22 +00:00
parent ff246de1cb
commit cc3facd1b8
2 changed files with 10 additions and 1 deletions

View file

@ -37,6 +37,12 @@ export const getAvailableActions = (getAllActions = false) => {
{ {
name: "Duplicate Row", name: "Duplicate Row",
component: DuplicateRow, component: DuplicateRow,
context: [
{
label: "Duplicated row",
value: "row",
},
],
}, },
{ {
name: "Delete Row", name: "Delete Row",

View file

@ -46,7 +46,10 @@ const duplicateRowHandler = async (action, context) => {
} }
delete draft._id delete draft._id
delete draft._rev delete draft._rev
await saveRow(draft) const row = await saveRow(draft)
return {
row,
}
} }
} }