Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
https://happy-coding-clans.github.io/vue-easytable/
MIT License
3.63k stars 725 forks source link

[Feature Request] 单元格编辑的时候,能支持键盘上下左右的回调吗 #523

Open LeePiaPia opened 1 year ago

LeePiaPia commented 1 year ago

选择要提交 issue 的库

vue-easytable

Issue 类型

Feature

Issue 标题

单元格编辑的时候,能支持键盘上下左右的回调吗

这个功能解决了什么问题?

实用键盘上下左右移动的时候,我需要判断选中的单元格是否在可视范围内,不在的话我需要滚动上来

你期望的 API 是什么样的?

可以监听键盘上下左右,或者做到自动帮我判断是否在可视范围内,并且移动就更好了

huangshuwei commented 1 year ago

键盘移动时暂时没有回调方法,不过你可以通过实例方法 getRangeCellSelection 去获取当前选中的单元格。文档参考:https://happy-coding-clans.github.io/vue-easytable/#/zh/doc/table/instance-methods?anchor=api