Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

开启虚拟滚动,又想要全局搜索,有什么好的方案吗 #345

Open
fong111 opened this issue Nov 21, 2023 · 3 comments
Open

Comments

@fong111
Copy link

fong111 commented Nov 21, 2023

临时方案:开启【虚拟滚动】后,滚动条【下拉底部】加载全量数据,CTRL+F才能全局搜索。
问题:开启虚拟滚动,又想要在页面头部进行全局搜索,有什么好的方案吗 @shinima

@fong111
Copy link
Author

fong111 commented Nov 21, 2023

补充一下,业务要求单次加载1W条数据,支持全局页面头部搜索某个单据(就是不愿意下拉到底部),所以采用虚拟滚动,但头部全局搜索这个无从下手

@xiaolinsq
Copy link

可以不用浏览器原生的查找,自己去实现一个查找组件,根据dataSource遍历所有单元格的值,跟搜索内容匹配则做统计;若需要实现向上/向下查找则要先实现表格跳转到对应单元格功能

@MeetinaXD
Copy link

那问题来了,在必须使用原生查找的限制下,如何实现虚拟滚动的全局搜索呢?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants