Skip to content

Conversation

@markallenramirez
Copy link
Contributor

Cherry-pick from #31890

@markallenramirez markallenramirez self-assigned this Jan 8, 2026
Copilot AI review requested due to automatic review settings January 8, 2026 09:22
@markallenramirez markallenramirez changed the title Diagram Demos - Fix typeExpr implementation (#31890) Diagram Demos - Fix typeExpr implementation Jan 8, 2026
Copy link
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

This pull request fixes the implementation of the typeExpr function in Diagram demos across all framework variants (jQuery, Vue, React, ReactJs, Angular). The fix ensures typeExpr properly implements the getter/setter pattern required by the DevExtreme Diagram API.

Key Changes:

  • Converted typeExpr from a getter-only function to a proper getter/setter function that accepts two parameters (obj and value)
  • When value === undefined, the function acts as a getter and returns the type value
  • When value is provided, the function acts as a setter, assigns the value to obj.type, and returns null
  • Applied consistently across 10 demo files covering two different demos in five framework variants

Reviewed changes

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

Show a summary per file
File Description
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/jQuery/index.js Implemented getter/setter pattern for typeExpr in jQuery demo
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Vue/App.vue Implemented getter/setter pattern for typeExpr in Vue TypeScript demo
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/ReactJs/App.js Implemented getter/setter pattern for typeExpr in React JavaScript demo
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/React/App.tsx Implemented getter/setter pattern for typeExpr in React TypeScript demo
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts Implemented getter/setter pattern for typeExpr in Angular demo
apps/demos/Demos/Diagram/CustomShapesWithTemplates/jQuery/index.js Implemented getter/setter pattern for typeExpr in jQuery demo (returns dynamic employee ID-based type)
apps/demos/Demos/Diagram/CustomShapesWithTemplates/Vue/App.vue Implemented getter/setter pattern for typeExpr in Vue TypeScript demo (returns dynamic employee ID-based type)
apps/demos/Demos/Diagram/CustomShapesWithTemplates/ReactJs/App.js Implemented getter/setter pattern for typeExpr in React JavaScript demo (returns dynamic employee ID-based type)
apps/demos/Demos/Diagram/CustomShapesWithTemplates/React/App.tsx Implemented getter/setter pattern for typeExpr in React TypeScript demo (returns dynamic employee ID-based type)
apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.component.ts Implemented getter/setter pattern for typeExpr in Angular demo (returns dynamic employee ID-based type)

@markallenramirez markallenramirez merged commit 557302f into DevExpress:26_1 Jan 8, 2026
123 of 125 checks passed
@markallenramirez markallenramirez deleted the fix_demo_diagram/26_1 branch January 8, 2026 10:27
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.

2 participants