angular-ui/ui-grid

scrollToIfNecessary sets bottomBound as NaN

Open

#3849 aperta il 24 giu 2015

Vedi su GitHub
 (9 commenti) (1 reazione) (1 assegnatario)JavaScript (2496 fork)batch import
help wantedneeds: analysis

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

In ui-grid - v3.0.0-rc.22 I am trying to execute the scrollTo functionality. When I hit line 5280:

var bottomBound = self.renderContainers.body.prevScrollTop + self.gridHeight - self.renderContainers.body.headerHeight - self.footerHeight - self.scrollbarWidth;

the value for 'self.renderContainers.body.headerHeight' is undefined which causes the 'bottomBound' to be set to 'NaN'. It seems like the value used here should instead be 'self.headerHeight' which is used to set the 'topBound' on line 5270.

Am I either incorrect in that the value should be switched or am I doing something else that causes self.renderContainers.body.headerHeight to be 'undefined'?

Guida contributor