3
0

Fix tabbed blocks not updating when options change

This commit is contained in:
Jože Fortun
2023-04-13 15:38:28 +02:00
parent ffd49d3783
commit aabd81fb05

View File

@@ -410,6 +410,7 @@ export default {
const { tabs = [] } = block.options
tabs.forEach(tab => {
if (this.blocks.some(({ blockID }) => blockID === tab.blockID)) return
const { blockID } = this.page.blocks.find(({ blockID }) => blockID === tab.blockID) || {}
if (blockID) {
tabbedIDs.add(blockID)
@@ -418,8 +419,8 @@ export default {
})
return [
...this.page.blocks.filter(({ blockID }) => tabbedIDs.has(blockID)),
...this.blocks.filter(({ blockID }) => !tabbedIDs.has(blockID)),
...this.page.blocks.filter(({ blockID }) => tabbedIDs.has(blockID)),
]
},
},