DataTables / DataTables/SearchPanes
Search Panes keeps the data.start = 0 when serverSideProcessing is enabled and the Scroller Extension is used
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
We have a project, where we use the SearchPanes extension, together with the Scroller Extension and serverSide Processing enabled. After enabling the SearchPanes extension, we made the observation that the "start" parameter in the request payload stays 0, when scrolling in the table with enabled filters.
Further debugging showed that the Scroller Extension sets the correct data.start value, but later when in the dataTables draw handler the registered 'preXhr' event handlers are called, the SearchPanes extension, sets the value to 0 because the this.s.page variable stays 0 in Line 801 of the SearchPanes class:
// Otherwise it is a paging request and we need to read from whatever the paging has been set to
else {
data.start = this.s.page * this.s.dt.page.len();
}
When disabling the Scroller extension, the this.s.page parameter is handled correctly, reflecting the current page in the Table.
It seems that actually the data.start value is already set to the correct value before the line is called with enabled Scroller-Extension resp. disabled Scroller-Extension, so that regular paging is used.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with SearchPanes, the Scroller Extension, and server-side processing enabled. Start at line 801 in the SearchPanes class and trace the preXhr handler alongside Scroller's update to data.start. Done means scrolling with filters preserves the correct start value in the request payload instead of resetting it to 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100