1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

Update dependency 3 (#5344)

* update react react-dom prop-types

* update seafile-editor version

* install deep-copy denpendency

* update router version

* repair focus bug

* optimize code

* optimize code
This commit is contained in:
杨顺强
2022-12-24 10:41:34 +08:00
committed by GitHub
parent bf313b947c
commit 3faa4acb8e
70 changed files with 669 additions and 1297 deletions

View File

@@ -25,7 +25,6 @@ class CreateRepoDialog extends React.Component {
library_template: libraryTemplates.length ? libraryTemplates[0] : '',
isSubmitBtnActive: false,
};
this.newInput = React.createRef();
}
handleRepoNameChange = (e) => {
@@ -69,10 +68,6 @@ class CreateRepoDialog extends React.Component {
this.props.onCreateToggle();
}
componentDidMount() {
this.newInput.focus();
}
validateInputParams() {
let errMessage = '';
let repoName = this.state.repoName.trim();
@@ -177,7 +172,7 @@ class CreateRepoDialog extends React.Component {
render() {
return (
<Modal isOpen={true} toggle={this.toggle}>
<Modal isOpen={true} toggle={this.toggle} autoFocus={false}>
<ModalHeader toggle={this.toggle}>{gettext('New Library')}</ModalHeader>
<ModalBody>
<Form>
@@ -186,9 +181,9 @@ class CreateRepoDialog extends React.Component {
<Input
id="repoName"
onKeyPress={this.handleKeyPress}
innerRef={input => {this.newInput = input;}}
value={this.state.repoName}
onChange={this.handleRepoNameChange}
autoFocus={true}
/>
</FormGroup>