onChange was called once as value wan't changed. The native <select /> has the same behavior.
onChange was called twice.
0.85.0
What is also worth mentioning is that this doesn't happen if you actually select an option from the list by clicking it.
It comes from #3391 that fixes #3370.
@mic4ael Can you please describe steps more detailed? I've made another codesandbox (https://codesandbox.io/s/jpnzzkl7pv), actually behavior looks correct to me.
In that case that is partially broken because just like I mentioned, this doesn't happen when you actually click the option instead of clicking outside of the dropdown.
Result is that onChange is triggered.
Dropdown.Result is that onChange is not triggered.
- Select one of them by clicking it
- Select the same option by clicking it.
Actually, it's a wrong behavior, you can compare it with a native <select />: https://codesandbox.io/s/jpnzzkl7pv
- Select one of them by clicking it
- Select the same option by typing it and clicking outside of the
Dropdown.
So the value is not changed on these steps, right? Actually, it's a correct behavior, see #3370.
So, at least I think that the first case I presented is a bug, right?
Yep, we should not call onChange when the selected value is not changed.
onChange was called once as value wan't changed.
onChange was called twice.
I would like to work on this one if there are no objections.
Feel free to pick up it 馃憤
sorry @mic4ael if you're working on this