tree element hack

This commit is contained in:
Jesper Møller Jensen
2023-01-26 00:40:36 +01:00
parent 5553a6240d
commit cdc56ce13a

View File

@@ -40,7 +40,12 @@ export class UmbTreeElement extends UmbLitElement {
this._treeContext?.setSelectable(newVal);
if (newVal) {
this._observeSelection();
requestAnimationFrame(() => {
//TODO: This is a hack! Remove requestAnimationFrame when the element gets fixed
//TODO: For now this _observeSelection is called before the _treeContext is initialized which results in the observer not being setup
//TODO: and selections not updating
this._observeSelection();
});
}
}