diff --git a/src/Async.js b/src/Async.js index f8e354b6e9..37c4f50776 100644 --- a/src/Async.js +++ b/src/Async.js @@ -72,6 +72,10 @@ export default class Async extends Component { }); } + clearOptions() { + this.setState({ options: [] }); + } + loadOptions (inputValue) { const { cache, loadOptions } = this.props; @@ -174,7 +178,13 @@ export default class Async extends Component { noResultsText: this.noResultsText(), placeholder: isLoading ? loadingPlaceholder : placeholder, options: (isLoading && loadingPlaceholder) ? [] : options, - ref: (ref) => (this.select = ref) + ref: (ref) => (this.select = ref), + onChange: (newValues) => { + if (this.props.value && (newValues.length > this.props.value.length)) { + this.clearOptions(); + } + this.props.onChange(newValues); + } }; return children({