image icon indicating copy to clipboard operation
image copied to clipboard

onChange callback skips first call when using controlled PreviewGroup

Open luanraithz opened this issue 1 year ago • 1 comments

Example: https://codesandbox.io/s/fervent-ardinghelli-h68vgk?file=/src/App.js

  • Click on "Open Preview"
  • Hit Arrow Left or Right on your computer 2 times, switching each time.

On the logs you we see that just one of your clicks was logged. I would expect the callback to be called every time there is a change

Edit 1: The dummy way to fix this is by simulating a click on the element before showing the preview.

luanraithz avatar Mar 22 '23 19:03 luanraithz