[Select] onChange fired with current value #20351
Labels
component: select
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
Current Behavior 😯
<Select>
onChange
handler is being called when the value is not actually changed/the user has selected the same value.Expected Behavior 🤔
<Select>
onChange
to only be called when the value is actually changed.Steps to Reproduce 🕹
Fork of https://material-ui.com/components/selects/#simple-select
https://codesandbox.io/s/material-demo-b7fys
Steps:
Context 🔦
Just noticed this happening and have dealt with it by doing a simple equality check, however, for consistency it would be nice if the non-native and native select
onChange
behavior would be the same.Your Environment 🌎
Using code sandbox all latest dependencies at time of writing
The text was updated successfully, but these errors were encountered: