Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Latest commit

 

History

History
28 lines (25 loc) · 788 Bytes

README.md

File metadata and controls

28 lines (25 loc) · 788 Bytes

Pass any props taken by either the rebass Input component or the react-autosuggest Autosuggest component:

<Autosuggest
  p={1}
  style={{border: '1px solid red'}}
  name="snack"
  label="Snack"
  suggestions={this.state.suggestions}
  onSuggestionsFetchRequested={({value}) => {
    this.setState({suggestions: getSuggestions(value)})
  }}
  onSuggestionsClearRequested={() => {
    this.setState({suggestions: []})
  }}
  getSuggestionValue={suggestion => suggestion.label}
  renderSuggestion={suggestion => suggestion.label}
  inputProps={
    { value: this.state.value
    , onChange: (e, {newValue}) => {
        this.setState({value: newValue})
      }
    }
  }
/>