diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx index 8467281637..398c939dd0 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx @@ -25,6 +25,11 @@ const Dropdown = ({ setOpen(prev => !prev) }, []) + const handleBreadCrumbClick = useCallback((index: number) => { + onBreadcrumbClick(index) + setOpen(false) + }, [onBreadcrumbClick]) + return ( / diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx index a77ee0ee7a..9c6e325df0 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx @@ -59,7 +59,7 @@ const Breadcrumbs = ({ const handleClickBreadcrumb = useCallback((index: number) => { const { setFileList, setSelectedFileList, setPrefix } = dataSourceStore.getState() - const newPrefix = prefix.slice(0, index - 1) + const newPrefix = prefix.slice(0, index + 1) setFileList([]) setSelectedFileList([]) setPrefix(newPrefix)