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

pagingOptions.currentPage doesn't get set properly with Angular >1.1.1. #598

Closed
dnordberg opened this issue Jul 29, 2013 · 10 comments
Closed

Comments

@dnordberg
Copy link

Using Ng-grid 2.0.7 pagingOptions.currentPage doesn't get set properly with Angular >=1.1.3 (The version provided by ng-grid in the lib folder).

It does work when reverting back to 1.0.2 which is the version defined in the plnkr provided on the ng-grid documentation page. The regression seems to have been introduced in 1.1.3 (1.1.1 works fine).

An example that illustrates the issue:
http://plnkr.co/edit/jxdukO?p=preview

The input field used to display the current page shows no initial value, using the paging buttons does not change the value as expected even after inputing a value manually. Also the validation doesn't seem to work as the input gets marked as invalid for valid numbers.

@chiefy
Copy link

chiefy commented Aug 16, 2013

👍

Also happens w/ ng-grid 2.0.7 w/ ng 1.2.0rc1 😨

This appears to be some kind of data-binding issue with the type="number" and ng parsing it as a string? I changed the template to use input="text" and everything seems to work.

@giosakti
Copy link

+1
also having this issue on 1.1.5, perhaps related is the fact that I can click next up to page 3, even though the number of pages is only 2

@geoffreytran
Copy link

+1
Having this issue on 1.2

@tbertenshaw
Copy link

Also experiencing this issue with 1.2.0rc1, easily replicatable by changing the angular version referenced in the serverside paging plunkr http://plnkr.co/edit/50vJrs?p=preview

@chiefy
Copy link

chiefy commented Sep 3, 2013

Just spent some time looking into this - for an easy fix just remove the max attribute from the number input and it works, although it obviously won't restrict the user navigating past pages with content (though it won't break the UI and they can easily page back).

@geoffreytran
Copy link

My solution was to change the input type to text from number as validation for number doesn't appear to work properly.

On Sep 3, 2013, at 10:58 AM, Christopher Najewicz notifications@github.com wrote:

Just spent some time looking into this - for an easy fix just remove the max attribute from the number input and it works, although it obviously won't restrict the user navigating past pages with content (though it won't break the UI and they can easily page back).


Reply to this email directly or view it on GitHub.

@chiefy
Copy link

chiefy commented Sep 3, 2013

@geoffreytran yeah, the max validation wasn't working properly, my PR fixes the issue. 🍔

@roblarsen
Copy link
Contributor

fixed with above PR

@vijender1256
Copy link

$scope.yourGridOptions.paginationCurrentPage = 1; --> will reset the pagenumber of angular ui-grid :)

@sudhirgoswami
Copy link

sudhirgoswami commented Aug 2, 2017

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

8 participants