react-component / react-component/select
select选择后报错`label` of `value` is not same as `label` in Select options.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
option里不是string而是dom结构的情景下,如果在onchange事件里去更新state,就会报这个错误,感觉原因是在抛出警告的判断上,optionlabel和rowlabel如果是reactnode的情况下,他们两个虽然结构一样但是不相等
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 Select warning path that compares option labels with row labels, and reproduce the case where an option uses a ReactNode and onchange updates state. Check whether structurally identical ReactNode labels trigger the warning; done means this valid scenario no longer reports a label mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100