From 96f8317acd8befb4442adb2be34c643d91e0ecc7 Mon Sep 17 00:00:00 2001 From: therusskiy Date: Tue, 15 Oct 2019 03:14:57 +0400 Subject: [PATCH 1/2] add UNSAFE_ --- src/Autosuggest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autosuggest.js b/src/Autosuggest.js index bdaffd58..5fdbd479 100644 --- a/src/Autosuggest.js +++ b/src/Autosuggest.js @@ -121,7 +121,7 @@ export default class Autosuggest extends Component { this.suggestionsContainer = this.autowhatever.itemsContainer; } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { if (shallowEqualArrays(nextProps.suggestions, this.props.suggestions)) { if ( nextProps.highlightFirstSuggestion && From 2422d9efecc12f0355f2f9120e9afd05c36a7a6f Mon Sep 17 00:00:00 2001 From: therusskiy Date: Tue, 15 Oct 2019 03:20:45 +0400 Subject: [PATCH 2/2] suppress eslint warnings --- src/Autosuggest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Autosuggest.js b/src/Autosuggest.js index 5fdbd479..ee46d658 100644 --- a/src/Autosuggest.js +++ b/src/Autosuggest.js @@ -121,6 +121,7 @@ export default class Autosuggest extends Component { this.suggestionsContainer = this.autowhatever.itemsContainer; } + // eslint-disable-next-line camelcase, react/sort-comp UNSAFE_componentWillReceiveProps(nextProps) { if (shallowEqualArrays(nextProps.suggestions, this.props.suggestions)) { if (