diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source-options/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source-options/index.tsx index b56e393fca..d0a410f5e0 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source-options/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source-options/index.tsx @@ -26,7 +26,7 @@ const DataSourceOptions = ({ }, [datasources, onSelect]) useEffect(() => { - if (options.length > 0) + if (options.length > 0 && !datasourceNodeId) handelSelect(options[0].value) // eslint-disable-next-line react-hooks/exhaustive-deps }, []) diff --git a/web/app/components/rag-pipeline/components/panel/test-run/data-source-options/index.tsx b/web/app/components/rag-pipeline/components/panel/test-run/data-source-options/index.tsx index afbba09594..f9a0b4c9b8 100644 --- a/web/app/components/rag-pipeline/components/panel/test-run/data-source-options/index.tsx +++ b/web/app/components/rag-pipeline/components/panel/test-run/data-source-options/index.tsx @@ -22,7 +22,7 @@ const DataSourceOptions = ({ }, [datasources, onSelect]) useEffect(() => { - if (options.length > 0) + if (options.length > 0 && !dataSourceNodeId) handelSelect(options[0].value) // eslint-disable-next-line react-hooks/exhaustive-deps }, []) diff --git a/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx b/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx index a8568266c4..125ba15983 100644 --- a/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx +++ b/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx @@ -242,7 +242,7 @@ const FileUploader = ({ }, [handleDrop]) return ( -