ElemeFE / ElemeFE/element-react

[Bug Report]级联选择器 在<Form.Item>中操作选项,无法触发表单校验

Open
#974 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

### Description

0. ~~当级联选择器在Form.Item中,有失焦校验时,级联选择器的选项无法选中~~ (解决方案:Trigger设置为"change"可解决)
0. 级联选择器 在中选择选项,无法触发表单校验。

### Reproduce Steps

![77sn1-h7npf](https://user-images.githubusercontent.com/12878132/57190391-32ae6b80-6f4c-11e9-8526-0246978617cb.gif)

### 表单验证

在防止用户犯错的前提下,尽可能让用户更早地发现并纠正错误。

```js
constructor(props) {
super(props);

this.state = {
options: [
{
value: '上海',
label: '上海',
children: [{
value: '浦东新区',
label: '浦东新区',
}, {
value: '黄浦区',
label: '黄浦区',
}]
},
],
form: {
...
area: []
},
rules: {
...
area: [
{ required: true, message: '请填写配送区域', trigger: 'blur' }
]
}
};
}
...
render() {
return (

...



...

)
}
```
:::

### Error Trace (if possible)

### Solution

### Additional Information

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.