Commit 31a6fbdb by zhaochengxiang

代理数据源信息

parent 6d56bc75
......@@ -10,15 +10,20 @@ const { Option } = Select;
const ProxyDatasourceItem = ({ value = {}, datasources = [], onChange }) => {
const onDatabaseChange = (id) => {
if (id) {
const filterDatasources = datasources?.filter(item => item.id === id);
if (filterDatasources.length > 0) {
onChange?.(filterDatasources[0]);
}
} else {
onChange?.({});
}
}
return (
<Select
value={value?.id}
allowClear
onChange={onDatabaseChange}
>
{
......
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