amis icon indicating copy to clipboard operation
amis copied to clipboard

Select 选择器 搜索到结果后,其下的子节点因为不匹配搜索条件不会显示

Open ArrNNG opened this issue 3 years ago • 0 comments

描述问题:

Select 选择器 搜索到结果后,其下的子节点因为不匹配搜索条件不会显示;但是 TreeSelect 树形选择器 似乎没有这个问题,在搜索到结果后,仍显示结果的子节点,即使结果的子节点并不与搜索条件匹配

截图或视频:

Select 选择器 搜索

https://user-images.githubusercontent.com/57611350/234790676-4111e09e-012a-4585-bd76-a3dae4d798b1.mov

TreeSelect 树形选择器 搜索

https://user-images.githubusercontent.com/57611350/234790722-91f718cf-b0bc-4940-b1e3-fd3f55532041.mov

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? https://aisuda.bce.baidu.com/amis/zh-CN/components/form/select

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "page",
  "body": {
    "type": "form",
    "api": "/amis/api/mock2/form/saveForm",
    "body": [
      {
        "label": "带搜索",
        "type": "select",
        "name": "a",
        "selectMode": "chained",
        "multiple": true,
        "searchable": true,
        "options": [
          {
            "label": "法师",
            "children": [
              {
                "label": "诸葛亮",
                "value": "zhugeliang",
                "children": [
                  {
                    "label": "AAAAA",
                    "value": "AAAAA"
                  },
                  {
                    "label": "BBBBB",
                    "value": "BBBBB"
                  }
                ]
              }
            ]
          },
          {
            "label": "战士",
            "children": [
              {
                "label": "曹操",
                "value": "caocao"
              },
              {
                "label": "钟无艳",
                "value": "zhongwuyan"
              }
            ]
          },
          {
            "label": "打野",
            "children": [
              {
                "label": "李白",
                "value": "libai"
              },
              {
                "label": "韩信",
                "value": "hanxin"
              },
              {
                "label": "云中君",
                "value": "yunzhongjun"
              }
            ]
          }
        ]
      }
    ]
  }
}

  1. 操作步骤 请简单描述一下复现的操作步骤...

ArrNNG avatar Apr 27 '23 07:04 ArrNNG