Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
: suggestions.length,
})
)
class Autocomplete extends PureComponent {
/* eslint-disable react/sort-comp */
state = {
suggestions: this.props.suggestions || [],
}
sectionIterator: createSectionIterator = getSectionIterator(this.props)
autosuggestInstance: Autosuggest = null
userAreTyping: ?boolean = true
static propTypes = {
...Autosuggest.propTypes,
forceSuggestedValue: PropTypes.bool,
}
static defaultProps = {
...Autosuggest.defaultProps,
highlightFirstSuggestion: true,
getSuggestionValue: (suggestion) => suggestion.value,
getSectionSuggestions: (section) => section.values,
forceSuggestedValue: true,
renderSuggestionsContainer: ({ containerProps, children, query }) => (
{children}
),
isSuggestAlreadySelected: (props) => Boolean(props.inputProps.IATACode),
isValueEqualWithFirstSuggest: (value, suggestions) => (