aurelia-ui-toolkits / aurelia-materialize-bridge

Materialize CSS components for Aurelia
http://aurelia-ui-toolkits.github.io/demo-materialize/
MIT License
156 stars 53 forks source link

Pagination useless event trigger #535

Open Stopi opened 5 years ago

Stopi commented 5 years ago

Hi,

on aurelia-materialize-bridge@1.1.10, when using pagination with this code : <md-pagination pages.bind="nbPages" active-page.bind="activePage" visible-page-links="14" md-on-page-changed.delegate="refresh($event)"></md-pagination>

I have nbPages == 1 and activePage == 1 at start.

Then, after loading my items, I change nbPages accordingly : this.nbPages = new_number_of_pages; It triggers the md-on-page-changed and call refresh($event) when activePage didn't changed.

I think it's a mistake. At least it shouldn't do this if activePage == 1 or maybe while activePage <= nbPages.