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,
}
} }
} }