Commit 4e667b43 by zhaochengxiang

数据源管理问题

parent 0f330102
......@@ -33,7 +33,7 @@ const DatasourceItem = (props) => {
useEffect(() => {
setTasks(null);
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [scope])
}, [scope, database])
const getTasks = () => {
setLoading(true);
......
......@@ -6,7 +6,7 @@ import DatasourceItem from './DatasourceItem';
const DatasourceList = (props) => {
const { loading, data, onEdit, onAddTask, onDelete, idBindTasksNeedRefresh, scope } = props;
const { loading, data, onEdit, onAddTask, onDelete, idBindTasksNeedRefresh, scope, database } = props;
const [ expandedBindId, setExpandedBindId ] = useState({});
......@@ -14,7 +14,7 @@ const DatasourceList = (props) => {
setExpandedBindId({});
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [scope])
}, [scope, database])
const onExpanded = (item) => {
if (expandedBindId.hasOwnProperty(item.id)) {
......@@ -69,7 +69,7 @@ const DatasourceList = (props) => {
</Space>
</div>
}
description={ <DatasourceItem data={item} scope={scope} expanded={expanded} refresh={idBindTasksNeedRefresh===item.id} /> }
description={ <DatasourceItem data={item} scope={scope} expanded={expanded} database={database} refresh={idBindTasksNeedRefresh===item.id} /> }
/>
</List.Item>
);
......
......@@ -398,6 +398,7 @@ const DatasourceManage = (props) => {
loading={loadingDatasources}
data={filterDatasources||[]}
scope={selectedScope}
database={selectedDatabaseKey}
idBindTasksNeedRefresh={currentDatasourceIdBindTasksNeedRefresh}
onEdit={editDatasource}
onAddTask={addTask}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment