mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
fix warnings and rename unsafe lifecycle function (#5814)
This commit is contained in:
@@ -23,7 +23,7 @@ class DeleteRepoDialog extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
if (!nextProps.isRepoDeleted) {
|
||||
this.setState({isRequestSended: false});
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ class SearchInput extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.value !== this.props.value) {
|
||||
this.setState({searchValue: nextProps.value});
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class Rename extends React.Component {
|
||||
this.newInput = React.createRef();
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
UNSAFE_componentWillMount() {
|
||||
this.setState({newName: this.props.currentNode.object.name});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class Rename extends React.Component {
|
||||
this.changeState(currentNode);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.changeState(nextProps.currentNode);
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ class Rename extends React.Component {
|
||||
this.newInput = React.createRef();
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
UNSAFE_componentWillMount() {
|
||||
this.setState({newName: this.props.dirent.name});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class Rename extends React.Component {
|
||||
this.changeState(dirent);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.changeState(nextProps.dirent);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user