Skip to content

DataGrid: command columns are available and workable in filterPanel - #34534

Merged
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:fix/grid-command-columns-in-filter-panel
Jul 30, 2026
Merged

DataGrid: command columns are available and workable in filterPanel#34534
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:fix/grid-command-columns-in-filter-panel

Conversation

@bit-byte0

Copy link
Copy Markdown
Contributor

What

DataGrid no longer offers command columns (the AI column, buttons, and other command columns) as fields in the filter panel, even when allowFiltering or allowHeaderFiltering is enabled for them

How

getFilteringColumns now skips any column that has a command type

@bit-byte0
bit-byte0 requested a review from a team as a code owner July 28, 2026 20:40
@bit-byte0 bit-byte0 added the 26_2 label Jul 28, 2026
Copilot AI review requested due to automatic review settings July 28, 2026 20:40
@bit-byte0 bit-byte0 self-assigned this Jul 28, 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

Adjusts DataGrid’s internal getFilteringColumns logic (used by filter panel/filter builder) to prevent command-type columns (e.g., AI/buttons) from being treated as filterable fields, and adds integration coverage to validate the new filtering behavior.

Changes:

  • Updated ColumnsController.getFilteringColumns() to exclude columns that have a type (command columns) from the filterable field list.
  • Added integration tests for getFilteringColumns() in the columns controller test suite.
  • Added an AI-column integration test to ensure AI columns are excluded from the filter panel field list.

Reviewed changes

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

File Description
packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts Refactors and tightens getFilteringColumns() to exclude type (command) columns and clarifies typing.
packages/devextreme/js/__internal/grids/grid_core/columns_controller/tests/columns_controller.integration.test.ts Adds integration coverage for getFilteringColumns() behavior.
packages/devextreme/js/__internal/grids/grid_core/ai_column/tests/unsupported_filtering_properties.integration.test.ts Adds a regression test to ensure AI columns are not exposed as filter panel fields.

Copilot AI review requested due to automatic review settings July 29, 2026 00:20
@bit-byte0
bit-byte0 force-pushed the fix/grid-command-columns-in-filter-panel branch from 5d09f28 to 834a8d4 Compare July 29, 2026 00:20

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 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts:523

  • The PR title/description says command columns should be available/workable (or that they were incorrectly missing) in the filter panel, but getFilteringColumns now explicitly excludes all command columns via !column.type (including AI/buttons/etc). Please align the PR metadata with the actual intent, or adjust the predicate if command columns are supposed to remain selectable in the filter panel.
    const isFilterableColumn = (column: Column): boolean => {
      const hasIdentifier = !!column.dataField || !!column.name;
      const allowsFiltering = !!column.allowFiltering || !!column.allowHeaderFiltering;
      return hasIdentifier && allowsFiltering && !column.type;
    };

@bit-byte0
bit-byte0 force-pushed the fix/grid-command-columns-in-filter-panel branch from 834a8d4 to dcf58c9 Compare July 29, 2026 06:40
Copilot AI review requested due to automatic review settings July 29, 2026 06:40

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 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts:523

  • The implementation here intentionally excludes any column with a truthy type from getFilteringColumns(), which matches the PR description (“skip any column that has a command type”), but conflicts with the PR title (“command columns are available … in filterPanel”). Please align the PR title with the actual behavior being introduced (command columns are excluded from the filter panel field list).
    const isFilterableColumn = (column: Column): boolean => {
      const hasIdentifier = !!column.dataField || !!column.name;
      const allowsFiltering = !!column.allowFiltering || !!column.allowHeaderFiltering;
      return hasIdentifier && allowsFiltering && !column.type;
    };

Copilot AI review requested due to automatic review settings July 30, 2026 07:35

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 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

packages/devextreme/js/__internal/grids/grid_core/columns_controller/types.ts:21

  • defaultFilterOperations is typed as string[], but it is assigned/used interchangeably with filterOperations (which is Array<FilterOperation | string> in ColumnBase). The narrower type can lead to type incompatibilities where default operations include non-string FilterOperation entries.
  defaultFilterOperations?: string[];

packages/devextreme/js/__internal/grids/grid_core/columns_controller/types.ts:14

  • FilterField narrows filterOperations to string[] | null, but ColumnBase.filterOperations supports Array<FilterOperation | string>. This loses type information for columns that use custom FilterOperation objects and can cause incorrect typing for consumers of getFilteringColumns().

This issue also appears on line 21 of the same file.

export type FilterField = Omit<Column, 'filterOperations'> & { filterOperations?: string[] | null };

@bit-byte0
bit-byte0 added this pull request to the merge queue Jul 30, 2026
Merged via the queue into DevExpress:main with commit ec42454 Jul 30, 2026
147 of 149 checks passed
@bit-byte0
bit-byte0 deleted the fix/grid-command-columns-in-filter-panel branch July 30, 2026 11:12
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