Skip to content

Commit

Permalink
fix: Fix federated project create
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Jul 17, 2020
1 parent 27e3b09 commit 2f2c00c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Modals/FedProjectCreate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class FedProjectCreateModal extends React.Component {
return callback()
}

if (value.length > 1) {
if (value.length > 0) {
const resp = await this.store.checkName({ name })
if (resp.exist) {
return callback({
Expand Down Expand Up @@ -141,8 +141,8 @@ export default class FedProjectCreateModal extends React.Component {

handleNameChange = () => {
if (this.clusterRef.current && this.clusterRef.current.state.error) {
const name = 'spec.placement.clusters'
if (this.formRef && this.formRef.current) {
const name = 'spec.placement.clusters'
this.formRef.current.resetValidateResults(name)
}
this.clusterRef.current.validate({
Expand Down Expand Up @@ -190,7 +190,7 @@ export default class FedProjectCreateModal extends React.Component {
return (
<Modal.Form
width={960}
ref={this.this.formRef}
formRef={this.formRef}
bodyClassName={styles.body}
data={formTemplate}
onCancel={onCancel}
Expand Down

0 comments on commit 2f2c00c

Please sign in to comment.