amis icon indicating copy to clipboard operation
amis copied to clipboard

select下拉组件的自动补全功能回显bug

Open zhangdongjie188 opened this issue 2 years ago • 3 comments

描述问题:

在使用 select 下拉组件的时候,使用了自动补全功能,在进行搜索后选择了一个,然后重新搜索,选择另一个的时候,之前选择的 就会变成 value 值的显示,不再显示 label 了

截图或视频:

20240409-195649

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

  1. 你是如何使用 amis 的? 在 amis 官网的组件中,编辑代码可复现

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

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

{
        "name": "select2",
        "type": "select",
        "label": "选项自动补全(多选)",
        "autoComplete": "http://localhost:8899/xxxx?title=${term}",
        "placeholder": "请输入",
        "labelField": "name",
        "valueField": "id",
        "clearable": true,
        "multiple": true,
        "maxTagCount": 2
      }
  1. 操作步骤 详见 gif 图

zhangdongjie188 avatar Apr 09 '24 12:04 zhangdongjie188

👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

github-actions[bot] avatar Apr 09 '24 12:04 github-actions[bot]

你的接口返回结果是什么样的

CheshireJCat avatar Apr 17 '24 09:04 CheshireJCat

接口返回: { "status": 0, "msg": "", "data": [{ "name": "zhangsan", "id": 11, "lisi": 22 }] }

zhangdongjie188 avatar Apr 17 '24 10:04 zhangdongjie188