Skip to content

Conversation

@dmlvr
Copy link
Contributor

@dmlvr dmlvr commented Jan 8, 2026

No description provided.

@dmlvr dmlvr self-assigned this Jan 8, 2026
@dmlvr dmlvr added the 26_1 label Jan 8, 2026
@dmlvr dmlvr marked this pull request as ready for review January 8, 2026 14:26
Copilot AI review requested due to automatic review settings January 8, 2026 14:26
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 PR fixes TypeScript strict mode issues in React demos for the Diagram, FileManager, and Gantt components, enabling them to be included in strict type checking by removing their exclusions from tsconfig.react-check.json.

Key changes include:

  • Added proper type annotations for component props, function parameters, and event handlers
  • Initialized React refs with explicit null values for strict null checking
  • Added optional chaining operators to safely access potentially undefined properties
  • Separated type imports from value imports following TypeScript best practices
  • Fixed property access patterns to use dataItem instead of deprecated properties

Reviewed changes

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

Show a summary per file
File Description
apps/demos/tsconfig.react-check.json Removed Diagram, FileManager, and Gantt demos from TypeScript strict mode exclusions
apps/demos/Demos/Gantt/TaskTemplate/React/TaskTemplate.tsx Added TaskTemplateProps interface for type safety
apps/demos/Demos/Gantt/ExportToPDF/ReactJs/App.js Fixed dataRange object structure with mode property
apps/demos/Demos/Gantt/ExportToPDF/React/App.tsx Added type annotations for event handlers and fixed dataRange structure
apps/demos/Demos/Gantt/ContextMenu/React/App.tsx Added ContextMenuPreparingEvent type for event handler
apps/demos/Demos/Gantt/Appearance/React/TaskTooltipTemplate.tsx Added type annotations for function parameters
apps/demos/Demos/Gantt/Appearance/React/TaskProgressTooltipContentTemplate.tsx Added type annotation for progress prop
apps/demos/Demos/FileManager/UICustomization/ReactJs/App.js Added optional chaining for safe property access
apps/demos/Demos/FileManager/UICustomization/React/data.ts Improved type safety with const assertion and FileExtensionName type
apps/demos/Demos/FileManager/UICustomization/React/App.tsx Added FileSystemItem interface and optional chaining
apps/demos/Demos/FileManager/Overview/ReactJs/App.js Added optional chaining for safe property access
apps/demos/Demos/FileManager/Overview/React/App.tsx Separated type imports and added optional chaining
apps/demos/Demos/FileManager/CustomThumbnails/React/App.tsx Added CustomFileSystemItem interface for customizeThumbnail callback
apps/demos/Demos/FileManager/BindingToEF/ReactJs/App.js Added optional chaining for safe property access
apps/demos/Demos/FileManager/BindingToEF/React/App.tsx Added type annotation for allowedFileExtensions and optional chaining
apps/demos/Demos/Diagram/UICustomization/ReactJs/App.js Added optional chaining for diagram ref access
apps/demos/Demos/Diagram/UICustomization/React/App.tsx Added DiagramRef type and optional chaining
apps/demos/Demos/Diagram/ReadOnly/ReactJs/App.js Added optional chaining for diagram ref access
apps/demos/Demos/Diagram/ReadOnly/React/App.tsx Added optional chaining for diagram ref access
apps/demos/Demos/Diagram/Overview/ReactJs/App.js Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/Overview/React/App.tsx Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/ItemSelection/ReactJs/App.js Fixed property access from item.text to item.dataItem
apps/demos/Demos/Diagram/ItemSelection/React/App.tsx Added types for event handler and fixed property access
apps/demos/Demos/Diagram/CustomShapesWithTexts/ReactJs/App.js Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/CustomShapesWithTexts/React/App.tsx Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/React/CustomShapeTemplate.tsx Added type annotations for function parameters
apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/React/App.tsx Added PopupContentFuncProps interface and ValueChangedEvent types
apps/demos/Demos/Diagram/CustomShapesWithTemplates/React/CustomShapeTemplate.tsx Added Employee type import and parameter types
apps/demos/Demos/Diagram/CustomShapesWithTemplates/React/App.tsx Added type annotation for showInfo callback
apps/demos/Demos/Diagram/Containers/ReactJs/App.js Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/Containers/React/App.tsx Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/AdvancedDataBinding/React/App.tsx Added type annotations for function parameters including undefined
apps/demos/Demos/Diagram/Adaptability/ReactJs/App.js Initialized ref with null and added optional chaining
apps/demos/Demos/Diagram/Adaptability/React/App.tsx Initialized ref with null and added optional chaining

const allowedFileExtensions: string[] = [];

export default function App() {
const [currentPath, setCurrentPath] = useState('Documents/Reports');
Copy link
Contributor

Choose a reason for hiding this comment

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

don't you want to use types on useState?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added type

Copy link
Contributor

Choose a reason for hiding this comment

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

could you please ensure that other places have typing as well

@dmlvr dmlvr merged commit bf07712 into DevExpress:26_1 Jan 8, 2026
96 checks passed
dmlvr added a commit to dmlvr/DevExtreme that referenced this pull request Jan 8, 2026
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.

2 participants