CardView: fix editing form fill when customizeItem set (T1335190) - #35166
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Runtime changes to editing.form.customizeItem are not propagated to the underlying dxForm.
Pull request overview
Updates CardView editing-form customization when editing.form.customizeItem is configured.
Changes:
- Composes built-in and user
customizeItemhandlers. - Preserves internal customization precedence.
- Adds integration coverage for form population and customization.
File summaries
| File | Summary |
|---|---|
packages/devextreme/js/__internal/grids/new/grid_core/editing/popup/view.ts |
Combines customization handlers. Moderate finding (1 vote): runtime callback changes are not propagated to the underlying dxForm. |
packages/devextreme/js/__internal/grids/new/grid_core/editing/popup/view.integration.test.ts |
Adds integration coverage for editing-form customization. |
packages/devextreme/js/__internal/grids/new/grid_core/editing/popup/component.tsx |
Ensures internal customization is passed to the form. |
Review details
Suppressed comments (1)
packages/devextreme/js/__internal/grids/new/grid_core/editing/popup/view.ts:155
- Changing
editing.form.customizeItemafter the popup has been rendered no longer causes the underlyingdxFormto receive a newcustomizeItemoption.customizeItemsis a stable function and the user callback is only read viapeek(), whileInfernoWrapperupdates widget options by comparing the final callback identity; consequently Form'scustomizeItemoption-change path, which rebuilds the items, is never triggered. Make the wrapper depend on the user callback and pass its current value (or otherwise propagate a callback-identity change) so runtime option updates reapply customization.
private readonly customizeItems = (item: dxForm.Item): void => {
this.customizeItemCore(item);
this.options.oneWay('editing.form.customizeItem').peek()?.(item);
};
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Alyar666
left a comment
There was a problem hiding this comment.
Please add the bug ID to the pull request title and to the corresponding tests.
customizeItem setcustomizeItem set (T1335190)
There was a problem hiding this comment.
🔵 Needs a closer look
One or more issues must be addressed before approval.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
packages/devextreme/js/__internal/grids/new/grid_core/editing/popup/component.tsx:61
- This explicit prop permanently masks the callback in
formProps. When a user supplies a stableediting.form.itemsarray and later changesediting.form.customizeItemwhile the edit popup is open,EditPopuprerenders but the Form still receives the samethis.customizeItemsfunction and unchangeditems;InfernoWrapper.updateComponentOptionstherefore never updatesdxForm.customizeItemor reprocesses those items. Make the wrapper callback identity or an explicit refresh depend on the current option, and cover this runtime-update case.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
No description provided.