Skip to content

feat(MultiSelect):关于Items数据量过大导致页面卡顿的问题 #3338

@shakugans

Description

@shakugans

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

MultiSelect的Items数据过多(比如这边erp有6万个物料,3000个番号之类的场景)会导致页面卡顿,貌似是因为MultiSelect会直接把Items的所有数据都显示到页面上,而query查询数据库的方式,对于一个选择器来说又会显得太慢。

Describe the solution you'd like

添加一个最大显示数,组件内缓存个ItemsCache,根据最大显示数量使用Take进行二次过滤。
或者像Select组件一样添加虚拟滚动来防止显示数据过多是否可行?

Additional context

在用table做表单的时候,经常会用到过滤功能,过滤的条件项使用MultiSelect会很香,比起sql使用like,MultiSelect获取具体值后sql使用in的查询效率会高很多!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions