refactor(core): wait for next tick to expand parent if parent is not initialized yet
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -160,13 +160,19 @@ export const applyChanges = <
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof currentChange.resizing === 'boolean') element.resizing = currentChange.resizing
|
||||
if (typeof currentChange.resizing !== 'undefined') element.resizing = currentChange.resizing
|
||||
|
||||
if (element.expandParent && element.parentNode) {
|
||||
const parent = elements[elementIds.indexOf(element.parentNode)]
|
||||
|
||||
if (parent && isGraphNode(parent)) {
|
||||
handleParentExpand(element, parent)
|
||||
if (!parent.initialized) {
|
||||
nextTick(() => {
|
||||
handleParentExpand(element, parent)
|
||||
})
|
||||
} else {
|
||||
handleParentExpand(element, parent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user