mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
[eslint] updated eslintrc and improved the code (#4702)
This commit is contained in:
@@ -43,7 +43,7 @@ class Rename extends React.Component {
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.changeState(nextProps.dirent);
|
||||
}
|
||||
|
||||
|
||||
handleChange = (e) => {
|
||||
if (!e.target.value.trim()) {
|
||||
this.setState({isSubmitBtnActive: false});
|
||||
@@ -51,7 +51,7 @@ class Rename extends React.Component {
|
||||
this.setState({isSubmitBtnActive: true});
|
||||
}
|
||||
|
||||
this.setState({newName: e.target.value});
|
||||
this.setState({newName: e.target.value});
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
@@ -74,7 +74,7 @@ class Rename extends React.Component {
|
||||
handleKeyPress = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
this.handleSubmit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toggle = () => {
|
||||
|
Reference in New Issue
Block a user