Skip to content

级联选择器的二级或三级中只有一个选项没有被禁用时,选择这个没有被禁用的选项,级联选择器展示的是上一级的内容 #34193

@iDestin

Description

@iDestin
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

如果一个级联选择器的二级或三级中只有一个选项没有被禁用时,选择这个没有被禁用的选项,级联选择器展示的是上一级的内容,如图

图片连接:https://i.bmp.ovh/imgs/2022/02/a943778b635c2994.png

What is expected?

展示选择的内容,而不是上一级内容

What is actually happening?

展示的是上一级的内容,不是选中的内容

Environment Info
antd 4.18.8
React 16.14.0
System MacOS 12.2.1
Browser 97.0.4692.99(正式版本) (x86_64)

比如省市区三级级联时,一个省只有一个市可以被允许选中时,选择这个市显示的却是省的名称,提交到后端的code也是省的编码,这样会有问题!希望能够解决一下谢谢

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions