1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00

Add output context to duplicate row action

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

View file

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

View file

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