react-component / react-component/image
onChange callback skips first call when using controlled PreviewGroup
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 124
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CodeSandbox reproduction linked in the issue and inspect the controlled PreviewGroup flow. Reproduce the case by opening the preview and pressing Arrow Left or Right twice, then trace why only one change reaches onChange. Done means the callback is called for every change in the controlled example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100