pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

👑 [需求] LightSelect 组件希望能支持远程搜索

Open zwmmm opened this issue 3 years ago • 1 comments
trafficstars

🔩 ProField ProTable

🥰 需求描述

使用轻量筛选下的 ProFormSelect 没办法实现远程搜索,查看源代码发现

options={
  keyword
    ? options?.filter((o) => {
        return (
          String(o[labelPropsName])?.toLowerCase()?.includes(keyword) ||
          o[valuePropsName]?.toString()?.toLowerCase()?.includes(keyword)
        );
      })
    : options
}

option 会按照keyword自动筛选,这会导致我通过搜索框请求后端接口来改变options的时候,会造成闪烁,先展示前端搜索的结果,然后再展示修改options之后的结果

并且 ProFormSelect 中的 fetchDataOnSearch 在 LightSelect 并没有使用

⛰ 功能需求适用场景

轻量筛选使用 ProFormSelect 的搜索

zwmmm avatar Aug 31 '22 02:08 zwmmm

没人回答的吗?

zwmmm avatar Sep 01 '22 05:09 zwmmm

image

换了配置了,你可以用 onSearch 来复写本地的办法

chenshuai2144 avatar Dec 26 '22 03:12 chenshuai2144