react-component / react-component/checkbox
Bug: 2.2.0 移除了 react-lifecycles-compat 导致在 react 15 下 value 不受控
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 132
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
rc-chekcbox version: 2.2.0
react version: 15.5.4
引入了不兼容的变更,导致在 react 15 下 value 不受控,选中状态无法通过外部传入 prop: value 改变
Link to code example:
const { check } = this.state;
return (
<Checkbox checked={check} onChange={() => this.setState({ check: !check })} />
);
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 by reproducing the controlled-value behavior with React 15.5.4 and rc-checkbox 2.2.0 using the supplied Checkbox example. Compare the 2.2.0 change that removed react-lifecycles-compat with the component's value and checked-state handling; done means externally supplied state changes the selected checkbox again under React 15.
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
- Mostly clear
- Newbie friendliness
- 35/100