Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Radio enter event will cancel select #2054

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shineout",
"version": "2.0.9",
"version": "2.0.10-beta.1",
"description": "Shein 前端组件库",
"main": "./lib/index.js",
"module": "./es/index.js",
Expand Down
3 changes: 3 additions & 0 deletions site/pages/documentation/changelog/2.x.x.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 更新日志
`### 2.0.10
- 修复 Radio 回车会取消选择的问题(< 2.0.10)

### 2.0.9
- 修复 FieldSet Children 类型错误(< 2.0.9)

Expand Down
1 change: 1 addition & 0 deletions src/Checkbox/CheckItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function checkItem(type: CheckType): React.ComponentClass<CheckItemProps, Checkb

handleEnter(e: KeyboardEvent) {
if (isEnterPress(e)) {
if (type === 'radio' && this.getChecked()) return
this.handleChange({
target: {
checked: !this.getChecked(),
Expand Down
Loading