You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try to export all flows from a project/folder, if you navigate to another folder, the selection is reseted but the 'selected all' checkbox maintain it's value.
Not a major issue, just an UX enhancement.
#iadevs
Reproduction
Go to your langflow app
Select a folder (or the default one)
Click on the 'select all' checbox. All the flows should be selected.
Navigate to another folder.
Go back to the previous folder you clicked on 'selected all'.
The flows now are not selected
The "select all" will still be checked.
Actually the select all will be checkedin even if you go to other folders.
Not sure of the python version, but I'm using the latest official docker image.
Expected behavior
The "Select All" should be unmarked when the flows became unselected.
Who can help?
No response
Operating System
Manjaro, using Docker official image.
Langflow Version
1.0.14
Python Version
None
Screenshot
2024-08-04.20-22-25.mp4
Flow File
No response
The text was updated successfully, but these errors were encountered:
To ensure that the "Select All" checkbox in the Langflow app is unchecked when the flows become unselected after navigating to another folder, you can modify the useSelectAll hook to reset the checkbox state when the folder changes. This can be done by adding a dependency on the folder state and ensuring that the handleSelectAll function is called with false when the folder changes.
Here is an updated version of the useSelectAll hook:
import{useCallback,useEffect}from"react";constuseSelectAll=(flowsFromFolder,getValues,setValue,currentFolder)=>{consthandleSelectAll=useCallback((select)=>{constflowsFromFolderIds=flowsFromFolder?.map((f)=>f.id);if(select){Object.keys(getValues()).forEach((key)=>{if(!flowsFromFolderIds?.includes(key))return;setValue(key,true);});return;}Object.keys(getValues()).forEach((key)=>{setValue(key,false);});},[flowsFromFolder,getValues,setValue]);useEffect(()=>{// Uncheck "Select All" when the folder changeshandleSelectAll(false);},[currentFolder,handleSelectAll]);return{ handleSelectAll };};exportdefaultuseSelectAll;
Additionally, ensure that the handleSelectAll(false) function is called in the useEffect hook within the Page component when the location changes:
import{useEffect}from"react";import{useLocation}from"react-router-dom";constPage=({ flow, view })=>{constlocation=useLocation();const{ handleSelectAll }=useSelectAll(flowsFromFolder,getValues,setValue,currentFolder);useEffect(()=>{setFolderUrl(folderId??"");setSelectedFlowsComponentsCards([]);handleSelectAll(false);getFolderById(folderId ? folderId : myCollectionId);},[location,handleSelectAll]);// ... rest of the component code};
In this updated version, the useEffect hook is used to call handleSelectAll(false) whenever the location changes, ensuring that the "Select All" checkbox is unchecked when navigating to another folder [1][2][3].
Bug Description
When you try to export all flows from a project/folder, if you navigate to another folder, the selection is reseted but the 'selected all' checkbox maintain it's value.
Not a major issue, just an UX enhancement.
#iadevs
Reproduction
Actually the select all will be checkedin even if you go to other folders.
Not sure of the python version, but I'm using the latest official docker image.
Expected behavior
The "Select All" should be unmarked when the flows became unselected.
Who can help?
No response
Operating System
Manjaro, using Docker official image.
Langflow Version
1.0.14
Python Version
None
Screenshot
2024-08-04.20-22-25.mp4
Flow File
No response
The text was updated successfully, but these errors were encountered: