Add option to save page layout as copy with or without references

This commit is contained in:
Jože Fortun
2023-09-20 10:56:28 +02:00
parent c89df1c846
commit d64ed2b456
5 changed files with 88 additions and 24 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { merge } from 'lodash'
import { Apply, NoID } from '../../../cast'
import { generateUID } from '../../helpers/idgen'
import { PageBlockMaker } from '.'
interface PageBlockStyleVariants {
[_: string]: string;
@@ -105,7 +106,7 @@ export class PageBlock {
}
clone (): PageBlockInput {
return { ...JSON.parse(JSON.stringify(this)), blockID: NoID, meta: { tempID: '' } }
return PageBlockMaker({ ...JSON.parse(JSON.stringify(this)), blockID: NoID, meta: { tempID: generateUID() } })
}
}