-
suggestions
are an array now, not a function. See docs. -
suggestionValue
was renamed togetSuggestionValue
-
suggestionRenderer
was renamed torenderSuggestion
and the signature is slightly different now.In 2.x, the second argument was the current value of the input field, or the value of the input field prior to Up/Down interactions:
function renderSuggestion(suggestion, currentValueOrValueBeforeUpDown)
In 3.x, the second argument is an object that contains both the current value of the input field, the the value of the input field prior to Up/Down interactions:
function renderSuggestion(suggestion, { value, valueBeforeUpDown })
-
showWhen
was renamed toshouldRenderSuggestions
-
inputAttributes
was renamed toinputProps
-
inputAttributes.onChange
was renamed toinputProps.onChange
and the signature is slightly different now.In 2.x, the first argument was the new value:
function onChange(newValue)
In 3.x, the first argument is the event, and the new value can be retrieved from the second argument:
function onChange(event, { newValue })
-
value
was renamed toinputProps.value
-
onSuggestionFocused
andonSuggestionUnfocused
were removed -
Bower support was removed
-
Uncontrolled behaviour is not supported in 3.x, and therefore
defaultValue
was removed -
cache
was removed. Caching is not part ofreact-autosuggest
anymore. You'll have to implement this yourself. Example -
Input debouncing is not part of
react-autosuggest
anymore. You'll have to implement this yourself. Example -
Support for delayed requests is not part of
react-autosuggest
anymore. You'll have to implement this yourself. Example -
scrollBar
doesn't exist in 3.x yet, but hopefully will be supported soon. -
Some
theme
properties have changed:
2.x 3.x
------------------------------------
root container
suggestions suggestionsContainer
suggestionIsFocused suggestionFocused
section sectionContainer
sectionName sectionTitle
sectionSuggestions sectionSuggestionsContainer