react-component / image

🖼 React Image Component
https://image-sepia.vercel.app
MIT License
195 stars 98 forks source link

onChange callback skips first call when using controlled PreviewGroup #211

Open luanraithz opened 1 year ago

luanraithz commented 1 year ago

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

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.

linxianxi commented 1 year ago

fixed in latest version