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

Paginator causes route reset #3871

Closed
stevenxi opened this issue Sep 7, 2017 · 2 comments
Closed

Paginator causes route reset #3871

stevenxi opened this issue Sep 7, 2017 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@stevenxi
Copy link

stevenxi commented Sep 7, 2017

I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see 

Current behavior
DataTable - Paginator, when current page reach the first or last page. The "move to first" or "move to last" icon in the paginator looks disabled. But when you click the disabled icon, whole application been redirect to the default route.

Expected behavior
The clicking disabled "move to first" or "move to last" page icon should do nothing.

Minimal reproduction of the problem with instructions
The demo page of official site: https://www.primefaces.org/primeng/#/datatable/paginator
Click the |< icon after open the page.

capture

Please tell us about your environment:
Chrome 60.0.3112.113

  • Angular version: 2.0.X
    Demo site

  • PrimeNG version: 2.0.X
    It's the official site demo page, so I would assume it's the latest version.

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome 60.0.3112.113

@stevenxi stevenxi changed the title DataTable paginator causing route reset DataTable paginator causes route reset (return to the home page) Sep 7, 2017
@davisb10
Copy link
Contributor

davisb10 commented Sep 8, 2017

@stevenxi I have created a pull request to fix this issue. It was caused by not preventing the default event for the button click when you were already on the first/last page.

@stevenxi
Copy link
Author

Thanks @davisb10

@cagataycivici cagataycivici changed the title DataTable paginator causes route reset (return to the home page) Paginator causes route reset Sep 12, 2017
@cagataycivici cagataycivici self-assigned this Sep 12, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 12, 2017
@cagataycivici cagataycivici added this to the 4.2 milestone Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants