Skip to content

DataGrid - fix default types in d.ts#34170

Open
Tucchhaa wants to merge 7 commits into
DevExpress:26_1from
Tucchhaa:fix_dts_26_1
Open

DataGrid - fix default types in d.ts#34170
Tucchhaa wants to merge 7 commits into
DevExpress:26_1from
Tucchhaa:fix_dts_26_1

Conversation

@Tucchhaa

Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa requested a review from a team as a code owner June 29, 2026 17:35
Copilot AI review requested due to automatic review settings June 29, 2026 17:35
@Tucchhaa Tucchhaa added the 26_1 label Jun 29, 2026
@Tucchhaa Tucchhaa self-assigned this Jun 29, 2026
@github-actions github-actions Bot added the .d.ts label Jun 29, 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.

Pull request overview

This PR updates DevExtreme widget TypeScript declarations to better match runtime “default option” values (primarily switching event handler defaults from null to undefined where options are not stored) and removes now-unnecessary @ts-expect-error suppressions in grid filtering code.

Changes:

  • Align dxDataGrid / dxTreeList event handler option types with @default undefined by adding | undefined and updating the JSDoc defaults.
  • Fix filterValue-related typings to allow null defaults and remove TS suppressions where the runtime explicitly assigns null.
  • Normalize draggable/sortable callback option types to reflect null defaults and simplify default options initialization.

Reviewed changes

Copilot reviewed 4 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/devextreme/js/ui/tree_list.d.ts Updates many TreeList action option defaults/types (nullundefined where appropriate).
packages/devextreme/js/ui/data_grid.d.ts Updates many DataGrid action option defaults/types (nullundefined where appropriate).
packages/devextreme/js/common/grids.d.ts Fixes grid base option and editing option typings (null vs undefined, incl. filterValue).
packages/devextreme/js/ui/filter_builder.d.ts Fixes value to allow null and aligns callback types with @default null; removes inappropriate @default undefined tags on field properties.
packages/devextreme/js/ui/sortable.d.ts Aligns sortable callback option types with runtime null defaults.
packages/devextreme/js/ui/draggable.d.ts Aligns draggable callback option types with runtime null defaults.
packages/devextreme/js/ui/card_view.d.ts Adjusts CardView defaults/types (notably filterValue and header dragging callbacks).
packages/devextreme/js/__internal/m_draggable.ts Cleans up TS suppressions in draggable default options initialization.
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_sync.ts Removes TS suppressions after filterValue typing update; keeps runtime behavior (null clears filter).
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_panel.ts Removes TS suppression for clearing filterValue to null.
packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts Replaces casted onDataErrorOccurred default with null directly.

Copilot AI review requested due to automatic review settings June 30, 2026 09:48

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

Copilot reviewed 33 out of 41 changed files in this pull request and generated 1 comment.

Comment thread packages/devextreme/js/__internal/m_draggable.ts Outdated
falseText?: string;
/**
* @docid GridBaseColumn.filterOperations
* @default undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed because this is a type of GridBaseColumn which is used in grid.columns[]. There are no default values for .option('column[i].filterOperations') in runtime

return {
...super._getDefaultOptions(),
// @ts-expect-error
onDragStart: null,

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.

This is just a question to clarify:

Is this change intentional?

Wouldn't it be better to leave these options in the default options list with the value 'undefined' instead of 'null'? Mainly for ease of search and consistency with the existing options list.

Do we intentionally want to completely remove them from '_getDefaultOptions()'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants