I expect onChange event fire when I select an Item in Dropdown component. However, onChange event fires even if I click elsewhere. How to prevent onChange event fire onBlur?
handleDomainChange = (e, data) => {
this.setState({
currantDomain_id: data.value,
currantWidget_id: "null",
}, () => {
this.props.dispatch(
statsFetch(
this.props.viewRange,
this.state.currantDomain_id,
this.state.currantWidget_id
)
);
this.widgetsDropdownOptions();
});
}
const DropdownDomains = () => (
<Dropdown
placeholder='all domains'
className="dropdown-title"
value={this.state.currantDomain_id}
selection
options={this.domainsDropdownOptions()}
onChange={this.handleDomainChange}
onBlur={this.nothing}
/>
)
Try
<Dropdown selectOnBlur={false} .../>
.