How to select a first table cell node of a new just inserted row at the end of a table? #5641
Unanswered
EugeneVorobyev
asked this question in
Q&A
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.
-
Hi everyone,
I am trying to recreate a functionality like Google Docs tables:
when TAB key is pressed and current position is at the last cell of the last row
then a new row is inserted and the first cell of the new row is selected
I've added a command listener for TAB key, that inserts a new row if the selection is the last cell of a table:
where
insertTableRowAtEnd()is just:The problem is that when I add a new row the state of table is not updated. So helpers (including table observer) don't detect new elements. I guess it's by design, because it's not reconciled yet.
But I can't wrap my head around how to enable such behavior. Should I add another listener to detect new row insertion?
Will appreciate any help! Thanks.
Beta Was this translation helpful? Give feedback.
All reactions