How to use the react-autosuggest.propTypes function in react-autosuggest

To help you get started, we’ve selected a few react-autosuggest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kupibilet-frontend / ui / src / components / Autocomplete / index.js View on Github external
: 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) => (

react-autosuggest

WAI-ARIA compliant React autosuggest component

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis