ant-design TreeSelect树选择 组件,多选情况下,子节点选择后禁用,仍可在input中通过关闭,将选择后禁用的节点删除选中

q7solyqu  于 2022-11-03  发布在  其他
关注(0)|答案(1)|浏览(1157)
  • I have searched the issues of this repository and believe that this is not a duplicate.

Steps to reproduce

  • treeData数据中将选中的目标节点禁用(通过treeData和TreeNode生成的树都有此问题)
  • 打开树里面的Node 2节点,可以看到生成的Child Node3是选中禁用状态
  • 直接在input中点击Child Node3标签的删除x按钮,树中之前选中的Child Node3节点状态直接设置为了未选择

What is expected?

按照正常逻辑,选择并且禁用后的节点,不应该被input中的标签操作

What is actually happening?

选择并且禁用的节点,在树里面是不可操作情况,但可以通过标签的删除越过禁用,然后清除了数据

EnvironmentInfo
antd3.16.3
Reactreact
Systemmac 10.14.4
Browserchrome 73.0.3683.103
o2gm4chl

o2gm4chl1#

Two Missing Case:

  1. Should not delete disabled selected node when click clear all button in input selector.
  2. Should not delete disabled selected node when enter "Delete" key in input selector.
    Need discussion.

相关问题