From 466a659ef2a5b094189197dd4a9b4261f27348ad Mon Sep 17 00:00:00 2001 From: Sylvia Crowe Date: Thu, 19 Sep 2024 16:02:59 -0700 Subject: [PATCH] fix: remove debounce on setTreeStateAtomUpdated --- frontend/layout/lib/layoutModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/layout/lib/layoutModel.ts b/frontend/layout/lib/layoutModel.ts index 02fdca99..78101cbc 100644 --- a/frontend/layout/lib/layoutModel.ts +++ b/frontend/layout/lib/layoutModel.ts @@ -377,7 +377,7 @@ export class LayoutModel { * Callback that is invoked when the upstream tree state has been updated. This ensures the model is updated if the atom is not fully loaded when the model is first instantiated. * @param force Whether to force the local tree state to update, regardless of whether the state is already up to date. */ - onTreeStateAtomUpdated = debounce(50, async (force = false) => { + async onTreeStateAtomUpdated(force = false) { const treeState = this.getter(this.treeStateAtom); // Only update the local tree state if it is different from the one in the upstream atom. This function is called even when the update was initiated by the LayoutModel, so we need to filter out false positives or we'll enter an infinite loop. if ( @@ -453,7 +453,7 @@ export class LayoutModel { this.setTreeStateAtom(force); } } - }); + } /** * Set the upstream tree state atom to the value of the local tree state.