angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.47k forks source link

Missing columns when using horizontal scrolling with RTL direction grid #7126

Closed gilbehar closed 4 years ago

gilbehar commented 4 years ago

When using ui-grid with latest Chrome (85+) or Edge, and setting up RTL grid, the left columns disappear while scrolling to left.

You can reproduce this issue easily on the RTL Support tutorial page:

There suppose to be 15 columns, when loading the grid you can see the first 3 which is ok, but when scrolling left after the 5th column you do not see column 6,7 etc... and columns 4 & 5 suddenly disappear

tomyam1 commented 4 years ago

This seems to be because the RTL scroll type detection in ui-grid needs to be updated

The recent code from https://github.com/othree/jquery.rtl-scroll-type returns different results

We solves it temporarily by loading jquery.rtl-scroll-type and doing :

ngModule.config(($provide: IProvideService) => {
    $provide.decorator('gridUtil', ($delegate: any) => {
        $delegate.rtlScrollType = () => {
            return $.support.rtlScrollType();
        }
        return $delegate;
    });
});

Can you verify if this works for you as well?

gilbehar commented 4 years ago

Thanks for your quick reply,

It works, but with a minor change $.support.rtlScrollType() is not a function so it should be

return $.support.rtlScrollType;

Many thanks

mportuga commented 4 years ago

Closed by https://github.com/angular-ui/ui-grid/pull/7130