Hi,
On React 19, the onChange event for the checkbox (and probably switch and maybe all the other fields) are called twice.
Reproduction:
<s-checkbox label="Test" onChange={() => console.log('CALLED')}></s-checkbox>
On React 19, clicking the checkbox will output “CALLED” twice.
On React 18, only once as expected.
Thanks!
I was able to replicate this. Looking into it
Hi @bakura10
There was an update released related to this - this should be fixed on your side now.
_Ryan
5
I’m still seeing this. It looks like the React shim for Polaris should not be adding an event for onChange in React 19. I created a new thread: onChange on Polaris web components still fires twice on React 19.