react-component / react-component/field-form
Pass `keyManager` to children of `Form.List`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 286
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 1
Description
Hi!
On my team we are really liking the new Form.List functionality. The current implementation works well for simple use cases, but doesn't not give you much access for complex cases when you need more control.
For example, I don't think there is a way right now to easily react to the addition of a new List.Item when using the passed add function. My current use case is setting a state field active to the newly added list item whenever a user decides to create one. I will manage the active state, but the List does not expose it's internal state in keyManager so I think I have no choice but to fully manage the list state.
Would appreciate your thoughts on this, thanks!
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
Review the existing Form.List implementation and its add function and keyManager API. Determine how children should access keyManager so callers can react to a newly added List.Item without fully managing list state. Done means the supported behavior and its expected tests are clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100