import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import Autocomplete from 'react-autocomplete' class AutocompleteInput extends React.Component { static propTypes = { value: PropTypes.string, options: PropTypes.array, onChange: PropTypes.func, } static defaultProps = { onChange: () => {}, options: [], } render() { const AutocompleteMenu = (items, value, style) =>
{items}
return item[0]} onSelect={v => this.props.onChange(v)} onChange={(e, v) => this.props.onChange(v)} renderItem={(item, isHighlighted) => (
{item[1]}
)} /> } } export default AutocompleteInput