react-component / react-component/table

onExpandedRowsChange triggered savral times and expandedRowKeys is wrong

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
618
Avg merge
10h 19m
Merged PRs (30d)
2

Description

i clicked a tr to expand this row,once i update the datasource and i reset expandedRowKeys to [], onExpandedRowsChange is triggered sevral times, and just the first time expandedRowKeys is right [], it mutated [0] in the other onExpandedRowsChange triggered

my version is 6.2.1

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

The issue names no files or tests; first reproduce the expanded-row update using react-component/table 6.2.1, resetting expandedRowKeys to [] after changing the datasource. Trace the onExpandedRowsChange calls and verify that the callback fires once and receives [] rather than a mutated [0].

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.