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

@@ -19,12 +19,6 @@ class AddDepartDialog extends React.Component {
departName: '',
errMessage: '',
};
this.newInput = React.createRef();
}
componentDidMount() {
this.newInput.focus();
this.newInput.setSelectionRange(0, 0);
}
handleSubmit = () => {
@@ -71,7 +65,7 @@ class AddDepartDialog extends React.Component {
render() {
let header = this.props.parentGroupID ? gettext('New Sub-department') : gettext('New Department');
return (
<Modal isOpen={true} toggle={this.props.toggle}>
<Modal isOpen={true} toggle={this.props.toggle} autoFocus={false}>
<ModalHeader toggle={this.props.toggle}>{header}</ModalHeader>
<ModalBody>
<Form>
@@ -82,7 +76,7 @@ class AddDepartDialog extends React.Component {
onKeyPress={this.handleKeyPress}
value={this.state.departName}
onChange={this.handleChange}
innerRef={input => {this.newInput = input;}}
autoFocus={true}
/>
</FormGroup>
</Form>