Commit 0eef2f8e by zhaochengxiang

bug fix

parent 74101056
......@@ -306,10 +306,14 @@ const ModelTree = (props) => {
} else if ((newData??[]).length>0) {
setItem(newData[0])
onSelect?.(newData[0].id)
} else {
onSelect?.()
}
} else if ((newData??[]).length>0) {
setItem(newData[0])
onSelect?.(newData[0].id)
} else {
onSelect?.()
}
},
error: () => {
......
......@@ -424,10 +424,12 @@ class Model extends React.Component {
}
onSearchInputChange = (value) => {
const { currentView } = this.state;
const { currentView, catalogId } = this.state;
if (currentView === 'branch') {
this.setState({ keyword: value}, () => {
if (catalogId) {
this.onTableChange();
}
})
} else {
this.setState({ keyword: value||'', catalogId: '' }, () => {
......@@ -776,6 +778,10 @@ class Model extends React.Component {
defaultPermission={canAdd}
onClick={() => {
if (currentView === 'branch') {
if (!catalogId) {
showMessage('warn', '请先新建项目')
return
}
this.setState({
branchAddParams: {
visible: true,
......
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