angular-ui/ui-grid

enableCellEditOnFocus does not work properly when a lot of columns.

Open

#6.772 geöffnet am 21. Juni 2018

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
good first issuegrid-editneeds: analysis

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

http://plnkr.co/edit/vpms1zqjILXS1QoeCYlm?p=preview To reproduce the problem you should сlick on the first cell, and then press the right arrow key until you force the table to initiate the scroll action. The cell outside the visible part of the table will not be active for editing. I think that the problem is in the last line of the ScrollHandler function.

function scrollHandler(evt) {
        var newScrollTop = $elm[0].scrollTop;
    var newScrollLeft = gridUtil.normalizeScrollLeft($elm, grid);

    var vertScrollPercentage = rowContainer.scrollVertical(newScrollTop);
    var horizScrollPercentage = colContainer.scrollHorizontal(newScrollLeft);

    var scrollEvent = new ScrollEvent(grid, rowContainer, colContainer, ScrollEvent.Sources.ViewPortScroll);
    scrollEvent.newScrollLeft = newScrollLeft;
        scrollEvent.newScrollTop = newScrollTop;
    if ( horizScrollPercentage > -1 ){
        scrollEvent.x = { percentage: horizScrollPercentage };
    }

    if ( vertScrollPercentage > -1 ){
        scrollEvent.y = { percentage: vertScrollPercentage };
    }

    grid.scrollContainers($scope.$parent.containerId, scrollEvent);
}

Contributor Guide