react-component / react-component/field-form

Pass `keyManager` to children of `Form.List`

Open
#120 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.