Reputation: 1
I'd like to know how to programmatically navigate to a specific cell on a Tabulator table. I see the documentation only specifies how to navigate up/down/left/right/prev/next, but it doesn't give the option to navigate to a specific cell.
I ask because I'm implementing multiple Tabulator table instances on my page, and there are certain cells that I'd like to take the user to another cell located in a different table when they tab out of it. I'm I have all the table instances saved neatly in an object, so I can leverage any available functions when needed.
There just doesn't seem to be a function for navigating to a specific cell, is there?
I've tried calling the focus() event on a specific cell instance, but that doesn't navigate the user to it. By navigate, I mean simulate as if the user clicked on the cell to edit it.
Upvotes: 0
Views: 38
Reputation: 8368
You need to call the edit
function on the cell you want the user to edit, this will draw focus to the cell and allow the user to edit it
cell.edit();
If that still does not do what you need, you could also look at calling the scrollTo
functions on the parent row and column, to scroll the cell into a particular position:
cell.getRow().scrollTo();
cell.getColumn().scrollTo();
cell.edit();
These options take various options that let you control how and where an element is scrolled into view.
You can find more info on these functions in the Component Object Docs
Upvotes: 0