ant-design / ant-design/pro-components

EditableProTable中valueType为radio如果通过formItemProps设置rules,radio的label变成不可选择

Open
#7,525 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

![企业微信截图_16920034396300](https://github.com/ant-design/pro-components/assets/49305419/914d6691-d1b9-40c5-8e08-b0281876a4f0)

```
{
title: 'radio',
dataIndex: 'radio',
valueType: 'radio',
fieldProps: {
options: [ { label: 'aaa', value: 'a', }, { label: 'bbb', value: 'b', }, { label: 'ccc',value: 'c', },],
},
formItemProps: {
// rules: [{ required: true, message: '请选择' }],
},
},
```
EditableProTable中columns使用radio,当我设置rules的时候,radio的label不能点击选中,但是不设置的时候,就可以,想知道原因是为啥
依赖版本:
"@ant-design/pro-components": "2.6.12"
"antd":"4.24.13"

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the EditableProTable columns shown, comparing the radio behavior with and without formItemProps.rules. Start by tracing EditableProTable's form-item and radio rendering, then verify that radio labels remain selectable when rules are present and add a regression test if the repository provides a relevant test entry point.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.