import React from 'react'
import Autosuggest from 'react-autosuggest'

import style from './bpk-autosuggest.scss'

const defaultTheme = {
  container:            'bpk-autosuggest__container',
  containerOpen:        'bpk-autosuggest__container--open',
  input:                'bpk-autosuggest__input',
  suggestionsContainer: 'bpk-autosuggest__suggestions-container',
  suggestionsList:      'bpk-autosuggest__suggestions-list',
  suggestion:           'bpk-autosuggest__suggestion',
  suggestionFocused:    'bpk-autosuggest__suggestion--focused',
  sectionContainer:     'bpk-autosuggest__section-container',
  sectionTitle:         'bpk-autosuggest__section-title'
}

const BpkAutosuggest = (props) => {
  const inputProps = {
    value: props.value,
    onChange: props.onChange
  }

  return (
    <Autosuggest
      suggestions={props.suggestions}
      onSuggestionsUpdateRequested={props.onSuggestionsUpdateRequested}
      getSuggestionValue={props.getSuggestionValue}
      renderSuggestion={props.renderSuggestion}
      inputProps={inputProps}
      theme={defaultTheme}
    />
  )
}

export default BpkAutosuggest

@@ -918,16 +918,100 @@
 uested%7D%0A
+      onSuggestionsClearRequested=%7Bprops.onSuggestionsClearRequested %7C%7C (() =%3E %7B%7D)%7D%0A
       ge
@@ -1102,16 +1102,86 @@
 estion%7D%0A
+      onSuggestionSelected=%7Bprops.onSuggestionSelected %7C%7C (() =%3E %7B%7D)%7D%0A
       in

Add subset of missing react-autosuggest props as optional properties