i have a gridpanel with cellediting plugin, and with a lot of grid header
(at least make the grid shown it horizontal scrollbar)...
here is the DEMO...
there is a bug in my grid, try to edit one of the collumn, and then press tab key to navigate to header15..
the grid didn't scroll to where i am editing,...
is it a bug?? a have looking for this at their forum, but no luck..
so, how to fix it??
how to make my grid scroll to the active editor??
from docs, there is a method scrollByDeltaX
,
but how to know the delta from active editor??
Cut it short, try demo first :)
(Too free, and wanted your bounty, please award me!)
Funny that my answer works just nice on 4.0.7, but it doesn't work on 4.0.2a! Out of no clue, I checked the source of
4.0.2a
, and shockingly saw this:In
src/panel/Table.js
(4.0.2a)Noticed anything? Checkout the function
scrollByDeltaX
! It's coded wrongly (fixed in 4.0.7)!!! And this will obviously wouldn't have any visual feedback. It is asking the vertical scrollbar to do a deltaX scrolling. How can it be?Anyway, to fix this problem is rather easy, in case you do not want to upgrade to 4.0.7. Afaik 4.0.7 has tons of bugs inherited from 4.0.6, and it breaks my project with that freaking masking issue.
Below is my working answer, and I hope you'll appreciate it. Basically I have modified the
onEditorTab
method and created an event hook, so yourgrid
can hook onto it, and do thescrollByDeltaX
when tabbing is triggered.I'm not too sure how to do a scroll left most/right most, so a funny
Infinity
has been used in my code out of laziness.Here is the example: DEMO (Remember to try out SHIFT+TAB too)
I still wondering if there might be a better solution... perhaps using column (
header
)'sx
to determine scroller'sscrollLeft
, but that will be pretty jerky...