mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
feat: fixed connectors dialog navigation, Implement bulk document deletion and improve search space filtering
- Added bulk delete functionality for documents in DocumentsTableShell and DocumentsSidebar. - Enhanced search space retrieval to exclude spaces marked for deletion in read_search_spaces. - Updated connector dialog to synchronize URL parameters when opened externally. - Improved layout behavior to handle search space deletion and redirection more effectively.
This commit is contained in:
parent
7c3aedf811
commit
d61e29e74b
7 changed files with 312 additions and 97 deletions
|
|
@ -490,6 +490,12 @@ export function useDocuments(
|
|||
apiToDisplayDoc,
|
||||
]);
|
||||
|
||||
const removeItems = useCallback((ids: number[]) => {
|
||||
const idSet = new Set(ids);
|
||||
setDocuments((prev) => prev.filter((item) => !idSet.has(item.id)));
|
||||
setTotal((prev) => Math.max(0, prev - ids.length));
|
||||
}, []);
|
||||
|
||||
return {
|
||||
documents,
|
||||
typeCounts,
|
||||
|
|
@ -498,6 +504,7 @@ export function useDocuments(
|
|||
loadingMore,
|
||||
hasMore,
|
||||
loadMore,
|
||||
removeItems,
|
||||
error,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue