react-typeahead
react-typeahead copied to clipboard
Use with react redux form
I use this with react-redux form . It is working . when destroy the redux from typeahead is not destroy (clean)
const renderTypeaheadField = ({ input, label,options, type, meta: { touched, error } }) => (
<div>
<Typeahead
options={options}
maxVisible={10}
{...input}
/>
{touched && error && <span className="required">{error}</span>}
</div>
)
componentWillReceiveProps(nextProps){
if( nextProps.submitSucceeded ) `{`
nextProps.destroy('add-customer')
}
}