Commit c73afbd6 by zhaochengxiang

bug fix

parent ce8a7960
...@@ -113,6 +113,12 @@ const ModelTree = (props) => { ...@@ -113,6 +113,12 @@ const ModelTree = (props) => {
} }
setItem(null); setItem(null);
} else {
if (prevItem && !item) {
setItem(prevItem);
onSelect && onSelect(prevItem?.key||'');
setPrevItem(null);
}
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchProperties]) }, [searchProperties])
......
...@@ -317,8 +317,10 @@ class Model extends React.Component { ...@@ -317,8 +317,10 @@ class Model extends React.Component {
onSearchPropertiesCancel = (searchProperties) => { onSearchPropertiesCancel = (searchProperties) => {
this.setState({ selectSearchPropertiesVisible: false }) this.setState({ selectSearchPropertiesVisible: false })
if (searchProperties) { if (searchProperties) {
this.setState({ loadingTableData: true, keyword: '', catalogId: '', searchProperties }, () => { this.setState({ keyword: '', catalogId: '', searchProperties }, () => {
this.onTableChange() if (searchProperties.length !== 0) {
this.onTableChange()
}
}) })
} }
} }
......
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