Feature: Conveniently get adjacent/neighbor cells from/relative to current cell #6162
Unanswered
vincerubinetti
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know we can get any arbitrary cell from any cell in the table using existing functions, but it's somewhat verbose, having to pass around indices and lookups. It would get more complicated for other users (not me) that are using the more advanced functionality like merging/spans/grouping/whatever, and the library could perhaps handle these more complex cases.
It'd be cool if we could do something like
cell.getRelative(0, -1)to e.g. get the cell in the same column, in the row directly above the current cell. And maybe other things likecell.getRelative(-2, "first"), and equivalent functions for other objects likerow.getRelative(1)(one row below this one).For context, I want to write some general logic that renders cells as
...ellipses when their values are exactly the same as the cells above them. Another example use case could be coloring cells differently based on the contents of adjacent cells.Beta Was this translation helpful? Give feedback.
All reactions