1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 03:47:09 +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

@@ -21,7 +21,6 @@ class CreateForder extends React.Component {
errMessage: '',
isSubmitBtnActive: false,
};
this.newInput = React.createRef();
}
componentDidMount() {
@@ -31,8 +30,6 @@ class CreateForder extends React.Component {
} else {
this.setState({parentPath: parentPath + '/'}); // sidePanel
}
this.newInput.focus();
this.newInput.setSelectionRange(0,0);
}
handleChange = (e) => {
@@ -81,7 +78,7 @@ class CreateForder 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 Folder')}</ModalHeader>
<ModalBody>
<Form>
@@ -90,9 +87,9 @@ class CreateForder extends React.Component {
<Input
id="folderName"
value={this.state.childName}
innerRef={input => {this.newInput = input;}}
onKeyPress={this.handleKeyPress}
onChange={this.handleChange}
autoFocus={true}
/>
</FormGroup>
</Form>