YousufFFFF commented on code in PR #37800:
URL: https://github.com/apache/superset/pull/37800#discussion_r2781714618


##########
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:
   Thanks for the suggestion. The latest commit already ensures the collapsed 
state is initialized only once while guarding against early renders where 
`folders` may not yet be populated. Subsequent `folders` updates preserve 
user-controlled collapse state.
   



-- 
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