react-component / react-component/field-form
Field > change key with resetCount
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 286
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 1
Description
Hi,
Why are you changing the Fragment key each time there is a reset?
In render of Field we have this:
https://github.com/react-component/field-form/blob/e9184848e73a5e39fd2976826a7020328dba01ed/src/Field.tsx#L644
This is causing unwanted unmount/remount of the Field each time we reset the form.
I don't see the point of doing that, but maybe I'm missing something. Can you help me understand?
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 at the linked render code in src/Field.tsx around line 644 and trace how resetCount changes the Fragment key. Reproduce a form reset and observe the Field unmount/remount behavior, then determine whether the key change is intentional and what behavior should be preserved.
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
- 38/100