镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Data source adapter, virtual data loader, TreeList data controller and data source adapter - type virtual data loader - #35523

Merged
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:refactor/type-virtual-data-loader-main
Oct 8, 2026
Merged

bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:refactor/type-virtual-data-loader-main

Conversation

@bit-byte0

@bit-byte0 bit-byte0 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What

Typed grid_core virtual data loader: fields, params, return types

How

Added loader contract and change types to types.ts, reused adapter ChangedEvent. pageIndex got getter/setter overloads

@bit-byte0
bit-byte0 requested a review from a team as a code owner October 6, 2026 18:19
Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:19
@bit-byte0 bit-byte0 added the 26_2 label Oct 6, 2026
@bit-byte0 bit-byte0 self-assigned this Oct 6, 2026

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.

Copilot review overview

🟡 Changes recommended

Several declared contracts contradict existing implementations, while a double assertion bypasses controller validation.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)
What changed in this PR

Adds strict typing to the legacy grid virtual data loader and extracts its contracts.

Changes:

  • Defines loader controller, cache, callback, and data-option contracts.
  • Annotates loader fields, parameters, and return types.
  • Connects the virtual-scroll controller to the typed loader.
File Description
m_virtual_scrolling_core.ts Passes the controller to the typed loader.
virtual_data_loader/​types.ts Defines loader contracts.
m_virtual_data_loader.ts Adds strict annotations and removes type suppressions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/devextreme/js/__internal/grids/grid_core/virtual_data_loader/types.ts Outdated
Comment thread packages/devextreme/js/__internal/grids/grid_core/virtual_data_loader/types.ts Outdated
export type ChangedCallback = (args?: unknown) => void;

export interface ProcessedChange {
changeType?: unknown;

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.

can DataChange or StoreChange type help here with better typing?

const processChanged = (
that: VirtualDataLoader,
changed: ChangedCallback,
changeType?: unknown,

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.

is it corresponds DataChange changeType or StoreChange type?

}

private handleDataChanged(callBase, e) {
private handleDataChanged(callBase: ChangedCallback, e?: { changes?: unknown }): void {

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.

same for changes type

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:26

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.

Copilot review overview

🔵 Needs a closer look

The controller’s double assertion bypasses validation of the newly introduced loader contract.

Review effort: Balanced
Findings: None

Resolved since last review (4)

@bit-byte0
bit-byte0 added this pull request to the merge queue Oct 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 8, 2026
@bit-byte0
bit-byte0 added this pull request to the merge queue Oct 8, 2026
Merged via the queue into DevExpress:main with commit 89664d4 Oct 8, 2026
149 checks passed
@bit-byte0
bit-byte0 deleted the refactor/type-virtual-data-loader-main branch October 8, 2026 10:42
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.

3 participants