Disable Scroll To Next Row | Keytable stop scroll to next line | Stop scrolling to next row
Disable Scroll To Next Row | Keytable stop scroll to next line | Stop scrolling to next row
aungkohein
Posts: 38Questions: 5Answers: 0
Hi!
I'm using Keytable for excel-like navigation. My user wants to stop scrolling to next row once he reached the end of each row.
Currently, it is having continuous scroll if you press the right arrow key.
How to disable that?
Thanks for the help!
This discussion has been closed.
Replies
Hi @aungkohein ,
That's not possible I'm afraid, not without modifying the KeyTable JS yourself (one perk of open source s/w). You can create new behaviour for keys, see this thread here, but if the key is recognised and already handled by KeyTable, it won't trigger the event.
Cheers,
Colin
This is the line of code to modify. Just make that
if
branch a noop and it will hold its current position at the end of the row.Allan
Hi @allan
I'm using dataTables.keyTable.min.js. Can you point where I can change it?
There is no row++ in min.js..
Hi @aungkohein ,
You wouldn't want to edit the minified version, just edit the version Allan linked to!
Cheers,
Colin
Hi @colin
Thanks for the help! But I can't get it right. I have tried removing row++ and changed to row-- etc. eventually, I removed the whole section. Doesn't work.
What I would like is to stop scrolling to next line at the end of each line (using right arrow keys or tab key)
As Allan said in his reply, just comment out lines 911 and 912.