checkbox
checkbox copied to clipboard
Change the priorities of defaultChecked and checked
🤔 This is a ...
- [ ] New feature
- [x] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
💡 Background and solution
📝 Changelog
| Language | Changelog |
|---|---|
| 🇺🇸 English | Modify defaultChecked's priority in Constructor and getDerivedStateFromProps,when defaultChecked has a value,default selected |
| 🇨🇳 Chinese | 在constructor和getDerivedStateFromProps中修改defaultChecked的优先级,当defaultChecked有值时,初始默认选中 |
☑️ Self Check before Merge
⚠️ Please check all items below before review. ⚠️
- [x] Doc is updated/provided or not needed
- [x] Demo is updated/provided or not needed
- [x] TypeScript definition is updated/provided or not needed
- [x] Changelog is provided or not needed
Test case needed.
Test case needed.
👌
There is no need to create another PR, just continue to push your changes.
when the checked value is undefined or null, input will ignore this property,I changed the code follow this principle.
There's another question, ‘// eslint-disable-next-line import/no-extraneous-dependencies’ ,when this code exist,it will commit failed,the termminal reported an error: 'Definition for rule 'import/no-extraneous-dependencies' was not found ',what should I do?🧎♂️