Inconsistent active page updates when performing client-side vertical scrolling
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
Current behavior
The active page is updated automatically when when client-side page updates and client-side vertical scrolling are enabled. The active page reaches an inconsistent state when scrolling up and down across page divides. This can be seen on the ngx-datatable demo page:
- Go to http://swimlane.github.io/ngx-datatable/
- Click “Sorting > Client-side” in the left navigation
- Scroll down until “Netur” is barely visible. The active page is page 2.
- Scroll up slightly. The active page is page 3.
- Scroll back down slightly. The active page is page 2.
The active page should not increase from page 2 to page 3 when scrolling up. The active page should not decrease when scrolling down.
Expected behavior
The page number should be consistent. When you scroll up the active page should either stay the same or decrease. When you scroll down the active page should either stay the same or increase.
Reproduction of the problem
This can be seen on the ngx-datatable demo page:
- Go to http://swimlane.github.io/ngx-datatable/
- Click “Sorting > Client-side” in the left navigation
- Scroll down until “Netur” is barely visible. The active page is page 2.
- Scroll up slightly. The active page is page 3.
- Scroll back down slightly. The active page is page 2.
What is the motivation / use case for changing the behavior?
The motivation is showing a page change that is consistent with the scrolling direction.
Please tell us about your environment:
Win 7, PhpStorm, npm, node.
- Table version: 0.7.x
6.3.0
- Angular version: 2.0.x
2.4.8
- 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 ]
all
- Language: [all | TypeScript X.X | ES6/7 | ES5] all
I am going to submit a suggested fix for this.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
I created a pull request for the suggested change:
https://github.com/swimlane/ngx-datatable/pull/569
@amcdnl, I believe this landed and can be closed unless there was an issue with the fix.