Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant code in slick.pager.js #1045

Open
Stephan-C opened this issue Jan 15, 2015 · 1 comment
Open

Redundant code in slick.pager.js #1045

Stephan-C opened this issue Jan 15, 2015 · 1 comment

Comments

@Stephan-C
Copy link

Hello

I was just changing the status text of the pager that gets displayed. Then I saw this code:
https://github.com/mleibman/SlickGrid/blob/master/controls/slick.pager.js Line 135 - 146

if (pagingInfo.pageSize == 0) {
var totalRowsCount = dataView.getItems().length;
var visibleRowsCount = pagingInfo.totalRows;
if (visibleRowsCount < totalRowsCount) {
$status.text("Showing " + visibleRowsCount + " of " + totalRowsCount + " rows");
} else {
$status.text("Showing all " + totalRowsCount + " rows");
}
$status.text("Showing all " + pagingInfo.totalRows + " rows");
} else {
$status.text("Showing page " + (pagingInfo.pageNum + 1) + " of " + pagingInfo.totalPages);
}

The $status.text("Showing all " + pagingInfo.totalRows + " rows"); just overwrites the if above it.

What should this code be.

Thanks

@6pac
Copy link

6pac commented Mar 13, 2015

This has been integrated into my 'alternative master'. See #1055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants