DataTables / DataTables/SearchPanes

Search Panes keeps the data.start = 0 when serverSideProcessing is enabled and the Scroller Extension is used

Open
#26 1 comment 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.