Skip to content

CardView: Fix cards not updating on column visibility/order changes (T1324855)#33011

Merged
Alyar666 merged 8 commits intoDevExpress:26_1from
Alyar666:T1324855_26_1
Mar 27, 2026
Merged

CardView: Fix cards not updating on column visibility/order changes (T1324855)#33011
Alyar666 merged 8 commits intoDevExpress:26_1from
Alyar666:T1324855_26_1

Conversation

@Alyar666
Copy link
Copy Markdown
Contributor

No description provided.

…24855)

- Add visibleColumnsLayout computed to track column identity/order changes
  without subscribing to sort/filter metadata updates
- Read visibleColumns via untracked() to avoid extra re-renders
- Add e2e tests for column chooser (select & dragAndDrop modes) and reordering
- Extract getCardFieldCaptions helper to shared cardUtils
@Alyar666 Alyar666 self-assigned this Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 10:35
@Alyar666 Alyar666 requested a review from a team as a code owner March 23, 2026 10:35
@Alyar666 Alyar666 added the 26_1 label Mar 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes CardView cards not updating when visible columns are reordered or toggled via the column chooser by ensuring the ItemsController.items computed is invalidated on visible column layout changes, and adds E2E coverage for the regression (T1324855).

Changes:

  • Add a computed “visible columns layout” signature and use it to trigger card re-creation on visible column order/visibility changes.
  • Add shared TestCafe helper to read card field captions.
  • Add E2E tests covering card updates on column reorder and column chooser hide/show (select + dragAndDrop).

Reviewed changes

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

File Description
packages/devextreme/js/__internal/grids/new/grid_core/items_controller/items_controller.ts Forces items recomputation when the visible columns layout changes (order/visibility).
e2e/testcafe-devextreme/tests/cardView/helpers/cardUtils.ts Adds helper to extract card field captions for assertions.
e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts Adds E2E test verifying cards update after column reordering.
e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts Adds E2E tests verifying cards update when hiding/showing columns via chooser.

Alyar added 2 commits March 23, 2026 15:06
…tems computed

- Replace name-only layout key with exclusion-based approach:
  only sortOrder, sortIndex, filterValues, filterType are excluded
  from the column layout key (they trigger data reload separately)
- Any new column property automatically triggers items recalculation
- Add unit tests for caption, format, alignment reactivity
Copilot AI review requested due to automatic review settings March 23, 2026 11:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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

cardIndex = 0,
): Promise<string[]> => {
const card = cardView.getCard(cardIndex);
const captionElements = card.element.find(FIELD_CAPTION_SELECTOR);
Copy link
Copy Markdown
Contributor

@Raushen Raushen Mar 23, 2026

Choose a reason for hiding this comment

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

We need card.getCaptions method

Comment on lines +13 to +15
// NOTE: Column properties that do NOT affect card rendering.
// Changes to these properties trigger data reload via dataController.items,
// so subscribing to them in visibleColumns causes extra re-renders (T1306983, T1309423).
Copy link
Copy Markdown
Contributor

@dmirgaev dmirgaev Mar 24, 2026

Choose a reason for hiding this comment

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

I don't understand this comment: these properties do NOT affect rendering, but cause extra re-renders while being changed, right? It sounds a bit contradictory

Copilot AI review requested due to automatic review settings March 25, 2026 14:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 7 out of 7 changed files in this pull request and generated 1 comment.

dmirgaev
dmirgaev previously approved these changes Mar 25, 2026
@Alyar666 Alyar666 merged commit 467c92a into DevExpress:26_1 Mar 27, 2026
102 checks passed
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.

4 participants