Add output context to duplicate row action
This commit is contained in:
parent
ff246de1cb
commit
cc3facd1b8
|
@ -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",
|
||||||
|
|
|
@ -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,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue