Commit 14cb0e23 by zhaochengxiang

bug fix

parent 677950e8
...@@ -43,7 +43,7 @@ const FC = (props) => { ...@@ -43,7 +43,7 @@ const FC = (props) => {
}, [selectedTargetType, supportedDatasourceTypies]) }, [selectedTargetType, supportedDatasourceTypies])
const getDatasource = () => { const getDatasource = () => {
setLoading(false) setLoading(true)
dispatch({ dispatch({
type: 'datasource.getDatasourceByMetadatald', type: 'datasource.getDatasourceByMetadatald',
payload: { payload: {
...@@ -55,8 +55,12 @@ const FC = (props) => { ...@@ -55,8 +55,12 @@ const FC = (props) => {
databaseType, databaseType,
}, },
callback: data => { callback: data => {
setLoading(false)
setDatasource(data) setDatasource(data)
setSelectedTargetType(data?.type) setSelectedTargetType(data?.type)
},
error: () => {
setLoading(false)
} }
}) })
} }
......
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