bito-code-review[bot] commented on code in PR #37800:
URL: https://github.com/apache/superset/pull/37800#discussion_r2781073082


##########
superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx:
##########
@@ -105,6 +105,14 @@ export const DatasourceItems = ({
     ),
   );
 
+  useEffect(() => {
+    setCollapsedFolderIds(
+      new Set(
+        folders.filter(folder => folder.isCollapsed).map(folder => folder.id),
+      ),
+    );
+  }, [folders]);

Review Comment:
   <!-- Bito Reply -->
   The updated logic initializes collapsed state once from folders on mount, 
preserving user toggles and syncing arrow state. Change the useEffect 
dependency to [] to avoid resetting on folders updates.
   
   
**superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx**
   ```
   useEffect(() => {
       setCollapsedFolderIds(
         new Set(
           folders.filter(folder => folder.isCollapsed).map(folder => 
folder.id),
         ),
       );
     }, []);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to