Skip to content

Commit

Permalink
useObserveフックの変更: 現在のツリーのデータをロードする前に、前のツリーとアイテムをリセットする
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun-Murakami committed May 5, 2024
1 parent 881b15d commit b7f1ae6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/useObserve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export const useObserve = () => {
}
const currentTree = useTreeStateStore.getState().currentTree;
if (currentTree) {
setPrevCurrentTree(null);
setPrevItems([]);
await loadCurrentTreeData(currentTree);
}

Expand Down

0 comments on commit b7f1ae6

Please sign in to comment.