Skip to content

Grids: split dataController _setPagingOptions into paging utils - #34669

Open
anna-shakhova wants to merge 3 commits into
DevExpress:mainfrom
anna-shakhova:data_set_paging_options_refactor_main
Open

Grids: split dataController _setPagingOptions into paging utils#34669
anna-shakhova wants to merge 3 commits into
DevExpress:mainfrom
anna-shakhova:data_set_paging_options_refactor_main

Conversation

@anna-shakhova

Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Aug 5, 2026
Copilot AI review requested due to automatic review settings August 5, 2026 14:59
@anna-shakhova
anna-shakhova requested a review from a team as a code owner August 5, 2026 14:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors GridCore’s DataController paging option application by extracting the paging reconciliation logic into dedicated utilities, improving testability and type-safety around scrolling-mode-derived paging behavior.

Changes:

  • Extracted paging reconciliation into resolvePaginate / syncPaging utilities and replaced _setPagingOptions with applyPagingOptions.
  • Improved grid option typing so scrolling.mode can be accessed without suppressions in the pager view.
  • Migrated/added Jest coverage for paging option application, including the T677650 regression scenario.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js Removes a QUnit regression test that is now covered via Jest in the internal grid tests.
packages/devextreme/js/__internal/grids/grid_core/pager/m_pager.ts Drops a TS suppression now that scrolling.mode is properly typed.
packages/devextreme/js/__internal/grids/grid_core/m_types.ts Extends internal grid option typing to include scrolling with a typed mode.
packages/devextreme/js/__internal/grids/grid_core/data_controller/utils/paging.ts Introduces reusable paging utilities (resolvePaginate, syncPaging).
packages/devextreme/js/__internal/grids/grid_core/data_controller/utils/tests/paging.test.ts Adds focused unit tests for paging utility behavior and ordering guarantees.
packages/devextreme/js/__internal/grids/grid_core/data_controller/types.ts Adds shared paging-related types used by the controller and utilities.
packages/devextreme/js/__internal/grids/grid_core/data_controller/data_controller.ts Replaces inline paging option sync with applyPagingOptions + utilities; keeps behavior around reload/pageChanged.
packages/devextreme/js/__internal/grids/grid_core/data_controller/tests/data_controller.paging.test.ts Adds controller-level paging behavior tests, including no-op option updates and scrolling-derived behavior.

Comment on lines +14 to +16
/**
* Brings `dataSource` to `target` and reports what changed.
*/
return dataController.dataSource() as PagingAdapter;
};

describe('_applyPagingOptions', () => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants