[v2] Add a listener for array-level field changes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
An array field's change listener runs whenever any of its subfields changes. However, consumers may only be interested in changes to the array itself, such as moving an item, rather than changes to the values inside each item.
It would be useful to provide a dedicated listener for these array-level operations. This would let consumers react to changes in the array's structure or ordering without also handling every nested field change.
Some thoughts
One possible implementation is to trigger the listener from changes to _arrayVersion. Whether that internal value should be exposed directly or used behind a higher-level listener API is open for discussion.
Contributor guide
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 by tracing where the internal _arrayVersion value changes and where array-field listeners are registered. Determine how a dedicated listener can distinguish array structure or ordering changes from nested field changes, then verify that structural changes notify it without notifying it for nested value changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100