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

Sorting a single column emits an 'onPage' event #3408

Closed
mkemmerling opened this issue Jul 17, 2017 · 0 comments
Closed

Sorting a single column emits an 'onPage' event #3408

mkemmerling opened this issue Jul 17, 2017 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mkemmerling
Copy link

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 http://forum.primefaces.org/viewforum.php?f=35

Current behavior
In version 4.1.0 of the DataTable the setter for the first value triggers pagination which in turn emits an onPage event.

The sortSingle() method sets this.first = 0; which will therefore emit the onPage event.

Expected behavior
No onPage event emitted on sorting a single column.

That is, sortSingle() should probably set the private variable _first instead of first to 0 (as is done in all other places of the DataTable where the first value is reset).

Please tell us about your environment:*

  • Angular version: 4.3.0

  • PrimeNG version: 4.1.0

  • Browser: all

@cagataycivici cagataycivici self-assigned this Aug 23, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 23, 2017
@cagataycivici cagataycivici added this to the 4.1.4 milestone Aug 23, 2017
@cagataycivici cagataycivici changed the title DataTable: Sorting a single column emits an 'onPage' event Sorting a single column emits an 'onPage' event Aug 23, 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

2 participants