react-component / react-component/cascader
useDisplayValues能否在返回体加个disabled 属性, 然后默认取值option的disabled?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 233
- Forks
- 149
- Avg merge
- 10h 23m
- Merged PRs (30d)
- 2
Description
因为在传入rc-select@14.1.2@rc-select中的 BaseSelect , 的 onKeyDown
:onInternalKeyDown中会根据这个disabled来判断,是否能删除这个已选中的属性。
使用场景是,当配合Form.Item,回填使用的时候当option中已经加了disabled 这时是不能选中。期望是不能删除,但是现在是能删除已经选择的。
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
Trace useDisplayValues into rc-select's BaseSelect and its onKeyDown/onInternalKeyDown handling. Check how Form.Item refill values and option disabled state are represented. Done means returned values preserve disabled from the option and a disabled selected value cannot be deleted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100