Deleting an Agentflow from the List view won't show the updates List view
Describe the bug
When deleting an AgentFlow from the list view using the options dropdown, the list does not refresh correctly. Instead of showing the updated list, it appears empty until the page is manually reloaded.
To Reproduce
- Go to the Agentflows page
- Select the list view
- Try to delete an Agentflow
- Observe, that the Agentflow list is not shown anymore, and a javascript error can be seen:
index.jsx:167 TypeError: Cannot read properties of undefined (reading 'length')
Expected behavior
After deleting an AgentFlow, the list should automatically refresh and display the remaining entries.
Screenshots
Flow
No response
Use Method
pnpm start
Flowise Version
No response
Operating System
None
Browser
None
Additional context
It seems that when refreshing getAllAgentflows.data in the useEffect within agentflows/index.jsx, no paging parameters are provided.
As a result, the function returns a plain array instead of the expected object structure { data: [], total: 0 }.
@HenryHengZJ Looking into it
@HenryHengZJ this fixes the delete refresh issue -> https://github.com/FlowiseAI/Flowise/pull/5473