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

@@ -14,12 +14,6 @@ class CreateGroupDialog extends React.Component {
errorMsg: '',
isSubmitBtnActive: false,
};
this.newInput = React.createRef();
}
componentDidMount() {
this.newInput.focus();
this.newInput.setSelectionRange(0, 0);
}
handleGroupChange = (event) => {
@@ -69,17 +63,17 @@ class CreateGroupDialog extends React.Component {
render() {
return(
<Modal isOpen={this.props.showAddGroupModal} toggle={this.props.toggleAddGroupModal}>
<Modal isOpen={this.props.showAddGroupModal} toggle={this.props.toggleAddGroupModal} autoFocus={false}>
<ModalHeader toggle={this.props.toggleAddGroupModal}>{gettext('New Group')}</ModalHeader>
<ModalBody>
<label htmlFor="groupName">{gettext('Name')}</label>
<Input
innerRef={input => {this.newInput = input;}}
type="text"
id="groupName"
value={this.state.groupName}
onChange={this.handleGroupChange}
onKeyDown={this.handleKeyDown}
autoFocus={true}
/>
<span className="error">{this.state.errorMsg}</span>
</ModalBody>