-
Notifications
You must be signed in to change notification settings - Fork 661
DataGrid - AI Column is empty in the adaptive row #31909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataGrid - AI Column is empty in the adaptive row #31909
Conversation
bd841a4 to
4d5cbe9
Compare
There was a problem hiding this comment.
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 fixes an issue where AI column values were not properly displayed in adaptive detail rows (the expandable rows shown when columns are hidden due to responsive layout). The problem occurred because the adaptive detail row rendering was attempting to recalculate AI column values using calculateCellValue(), but AI column values are stored in a cache and should be retrieved from the already-calculated row.values array.
Key Changes
- Added special handling for AI columns in adaptive detail rows to retrieve values from the pre-calculated
row.valuesarray instead of recalculating them - Extracted value retrieval logic into a reusable
_getValueFromCellOptionsmethod - Added comprehensive E2E test to verify AI column values display correctly in adaptive detail rows
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts |
Added import for AI_COLUMN_NAME constant, created _getValueFromCellOptions helper method, and added conditional logic to use pre-calculated values for AI columns in adaptive detail rows |
e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/adaptivity.functional.ts |
Updated fixture to use container with AI integration support and added new test case that verifies AI column values appear correctly in adaptive detail rows |
e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/adaptivity.functional.ts
Outdated
Show resolved
Hide resolved
…ity.functional.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com>
There was a problem hiding this 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 2 out of 2 changed files in this pull request and generated 4 comments.
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com>
There was a problem hiding this 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 2 out of 2 changed files in this pull request and generated 1 comment.
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts
Show resolved
Hide resolved
There was a problem hiding this 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 2 out of 2 changed files in this pull request and generated no new comments.
There was a problem hiding this 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 4 out of 4 changed files in this pull request and generated 1 comment.
e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/adaptivity.functional.ts
Show resolved
Hide resolved
| delete (window as any).aiResolve; | ||
| }); | ||
|
|
||
| test('The AI column should have value in the adaptive detail row', async (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason to move this test up? I wonder if it can be a problem for future us (=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not key change for test. The key change is fixture without disablePageReloads in the test file.
I moved test to the bottom of the file and it's green.
There was a problem hiding this 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 4 out of 4 changed files in this pull request and generated 1 comment.
No description provided.