meta-magic / amexio.github.io

Amexio is a rich set of Angular 7 (170+) components powered by HTML5 & CSS3 for Responsive Design and with 80+ Material Design Themes, UI Components, Charts, Gauges, Data Point Widgets, Dashboards. Amexio is completely Open Sourced and Free. It's based on Apache 2 License. You can use it in your production grade work today at no cost or no obligation.
http://www.amexio.tech
Apache License 2.0
166 stars 72 forks source link

Pagination component Onfirst click, page change event is not emitted. #58

Closed bhanukumar04 closed 6 years ago

bhanukumar04 commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request

Current behavior

when you click on page last its working and emitting the page change event , but when you click on the go to first its not emitting the events.

see the paginator.component.ts code below:

onFirstClick() { this.activePageIndex = 0; this.changeRows(this.pageIndex[0], 0, null); }

onLastClick() { this.activePageIndex = this.activePages.length - 1; this.changeRows(this.pageIndex[this.pageIndex.length - 1], this.pageIndex.length - 1, null); this.activePageIndex = this.activePages.length - 1; this.activePage = this.activePages[this.activePages.length - 1]; this.onPageChange.emit(this.activePage); }

Expected behavior

when you click on go to first it should emit event , for all other clicks its working expect go to first.

Environment


Angular version: 5.2.0
npm: 9.X


Browser:
- [ X] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ X] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ X] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: 9.X
- Platform:   Linux            
pratikthecook commented 6 years ago

Fixed 32de82626782e760c8a95fb04914265369ba25d5