amis icon indicating copy to clipboard operation
amis copied to clipboard

select组件,multiple模式下,采用远程搜索,已选择项会被自动清除

Open zsfish opened this issue 5 years ago • 3 comments

实现场景:

form的select组件,multiple模式。配置searchable:true,autoComplete设置为后端接口。每次输入都是去后端重新拉取数据。未输入时,后端返回为空数组

存在的问题:

如果我一开始输入条件A,选择下拉列表中的a。然后输入另外一个互斥条件B,选择下拉列表中的b。此时输入框里面的a会被自动清除

当前方案:

{ "type": "page", "body": { "type": "form", "controls": [ { "name": "select", "type": "select", "label": "选项自动补全", "multiple": true, "searchable": true, "autoComplete": "https://houtai.baidu.com/api/mock2/options/autoComplete?term=$term", "placeholder": "请输入" } ] } }

code here...

zsfish avatar Dec 28 '20 06:12 zsfish

是说这个例子有问题?没事试出来,能录个 gif 么?或者是和浏览器有关?

nwind avatar Dec 29 '20 14:12 nwind

Uploading 624bb8224b044058989966e2a608ad93.gif…

zsfish avatar Jan 08 '21 02:01 zsfish

图挂了,估计是修了?

nwind avatar Nov 01 '21 16:11 nwind