nadbm/react-datasheet

Cell navigation

Open

#130 创建于 2018年10月23日

在 GitHub 查看
 (0 评论) (2 反应) (0 负责人)JavaScript (5,323 star) (513 fork)batch import
enhancementhelp wanted

描述

For a table with columns A:B and rows 1:10, where A1:A10 are single cells, then B1 and B6 are cells with rowSpan 5 (merging B1:B5 and B6:B10). Hitting the down arrow from B1 does not go to B6 as you'd expect, instead it doesn't move.

There is a similar issue with colSpan. In a table A1:D2, where A1 has colSpan 3 (merging A1:C1), pressing up from B2 goes to D1, while you'd expect any of A2, B2, C2 to go to A1.

Would it be possible for the destination cell to be offset based on colSpan/rowSpan? So in the first example, the target cell (which I assume is currently a non-existent B2) would be B(1+B1'sRowSpan). In the second example, the up/down arrows seem to target the nth cell of the adjacent row without considering colSpan. Instead, could this n value include cells with colSpan=3 as 3 cells instead of 1?

This would really improve the mouse-free navigation. Many thanks!

贡献者指南