mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 16:00:38 +00:00
fix copying table with actions
This commit is contained in:
@@ -264,7 +264,21 @@
|
||||
}
|
||||
const newItem = insertNewGridItem(
|
||||
$app,
|
||||
(id) => ({ ...item.data, id }),
|
||||
(id) => {
|
||||
if (item.data.type === 'tablecomponent') {
|
||||
return {
|
||||
...item.data,
|
||||
id,
|
||||
actionButtons:
|
||||
item.data.actionButtons.map((x) => ({
|
||||
...x,
|
||||
id: x.id.replace(`${item.id}_`, `${id}_`)
|
||||
})) ?? []
|
||||
}
|
||||
} else {
|
||||
return { ...item.data, id }
|
||||
}
|
||||
},
|
||||
parentGrid,
|
||||
Object.fromEntries(gridColumns.map((column) => [column, item[column]]))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user