checkbox icon indicating copy to clipboard operation
checkbox copied to clipboard

Change the priorities of defaultChecked and checked

Open huangminjianxx opened this issue 3 years ago • 4 comments

[中文版模板 / Chinese template]

🤔 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

#35130

💡 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

huangminjianxx avatar Apr 21 '22 10:04 huangminjianxx

Test case needed.

yoyo837 avatar Apr 21 '22 10:04 yoyo837

Test case needed.

👌

huangminjianxx avatar Apr 21 '22 10:04 huangminjianxx

There is no need to create another PR, just continue to push your changes.

yoyo837 avatar Apr 21 '22 10:04 yoyo837

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?🧎‍♂️

huangminjianxx avatar Apr 22 '22 06:04 huangminjianxx