-
Notifications
You must be signed in to change notification settings - Fork 661
DataGrid: fix ts issues in demos in strict mode #32058
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: fix ts issues in demos in strict mode #32058
Conversation
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 pull request enables TypeScript strict mode for React demos and addresses TypeScript compilation errors across DataGrid, TreeList, and CardView components. The configuration now uses an include-all with exclusions approach rather than explicitly listing files, making it easier to maintain as new demos are added.
Key changes:
- Enabled
strict: trueintsconfig.react-check.jsonfor comprehensive type checking - Added proper type annotations for state variables, function parameters, and refs
- Implemented null-safety checks using optional chaining and null coalescing operators
- Reorganized imports to separate type imports from value imports
Reviewed changes
Copilot reviewed 78 out of 78 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/demos/tsconfig.react-check.json | Enabled strict mode and switched to include-all/exclude pattern for maintainability |
| apps/demos/Demos/TreeList/WebAPIService/React(Js)/App.(tsx|js) | Added type import separation and unused parameter handling |
| apps/demos/Demos/TreeList/LocalReordering/React(Js)/App.(tsx|js) | Added boolean coercion for checkbox-controlled properties |
| apps/demos/Demos/TreeList/CustomizeKeyboardNavigation/React(Js)/App.(tsx|js) | Added boolean coercion for editOnKeyPress property |
| apps/demos/Demos/TreeList/ColumnChooser/React(Js)/App.(tsx|js) | Added boolean coercion and formatting fixes |
| apps/demos/Demos/DataGrid/WebAPIService/React/MasterDetailGrid.tsx | Added proper type annotation for dataSource state |
| apps/demos/Demos/DataGrid/Toolbar/React(Js)/App.(tsx|js) | Added optional chaining for dataGrid ref access |
| apps/demos/Demos/DataGrid/StatePersistence/React(Js)/App.(tsx|js) | Added optional chaining for dataGrid ref access |
| apps/demos/Demos/DataGrid/SignalRService/React(Js)/App.(tsx|js) | Added type annotation and import reorganization |
| apps/demos/Demos/DataGrid/RowEditing/React/App.tsx | Added type annotation for events array state |
| apps/demos/Demos/DataGrid/Row/React/DataRow.tsx | Cleaned up import formatting |
| apps/demos/Demos/DataGrid/RemoteReordering/React/App.tsx | Added event handler types and type casting for onReorder |
| apps/demos/Demos/DataGrid/RemoteCRUDOperations/React/App.tsx | Added type annotation for requests array state |
| apps/demos/Demos/DataGrid/PDFHeaderAndFooter/React(Js)/App.(tsx|js) | Added null checks for rect object |
| apps/demos/Demos/DataGrid/PDFExportMultipleGrids/React(Js)/App.(tsx|js) | Added null checks and optional chaining for grid refs and cells |
| apps/demos/Demos/DataGrid/PDFExportImages/React(Js)/App.(tsx|js) | Added comprehensive null checks for export callbacks |
| apps/demos/Demos/DataGrid/PDFCellCustomization/React(Js)/App.(tsx|js) | Added null checks and optional property access |
| apps/demos/Demos/DataGrid/NewRecordPosition/React(Js)/App.(tsx|js) | Added type annotations and required data property |
| apps/demos/Demos/DataGrid/MultipleSorting/React(Js)/App.(tsx|js) | Added optional chaining for dataGrid ref |
| apps/demos/Demos/DataGrid/MultipleRecordSelectionAPI/React(Js)/App.(tsx|js) | Added type annotations and optional chaining |
| apps/demos/Demos/DataGrid/HorizontalVirtualScrolling/React/data.ts | Improved type definitions for generated data |
| apps/demos/Demos/DataGrid/FocusedRow/React/App.tsx | Added type annotation for focusedRowKey state |
| apps/demos/Demos/DataGrid/FilteringAPI/React(Js)/App.(tsx|js) | Added optional chaining for dataGrid operations |
| apps/demos/Demos/DataGrid/Filtering/React(Js)/App.(tsx|js) | Added comprehensive types and null checks for filter expressions |
| apps/demos/Demos/DataGrid/FilterPanel/React/data.ts | Added detailed type definitions for order data |
| apps/demos/Demos/DataGrid/ExcelJSHeaderAndFooter/React(Js)/App.(tsx|js) | Added null-safe property access for cell ranges |
| apps/demos/Demos/DataGrid/ExcelJSExportMultipleGrids/React(Js)/App.(tsx|js) | Added null checks and optional chaining for export operations |
| apps/demos/Demos/DataGrid/ExcelJSExportImages/React(Js)/App.(tsx|js) | Added null checks for grid cells and columns |
| apps/demos/Demos/DataGrid/ExcelJSCellCustomization/React(Js)/App.(tsx|js) | Added comprehensive null checks for cell customization |
| apps/demos/Demos/DataGrid/DeferredSelection/React(Js)/App.(tsx|js) | Added null coalescing for async data fetching |
| apps/demos/Demos/DataGrid/CustomEditors/React(Js)/App.(tsx|js) | Fixed lookup dataSource handling and added null checks |
| apps/demos/Demos/DataGrid/CustomDataSource/React/App.tsx | Separated type imports from value imports |
| apps/demos/Demos/DataGrid/CommandColumnConfiguration/React(Js)/App.(tsx|js) | Added proper types for button render options and improved null safety |
| apps/demos/Demos/DataGrid/CellEditing/React/App.tsx | Added type annotation for selection state |
| apps/demos/Demos/DataGrid/Cell/React(Js)/DiffCell.(tsx|js) | Added null-safe property access for column caption |
| apps/demos/Demos/DataGrid/CascadingLookups/React(Js)/App.(tsx|js) | Fixed defaultSetCellValue call and added null checks |
| apps/demos/Demos/DataGrid/AdvancedMasterDetailView/React/*.tsx | Added type annotations for store states |
| apps/demos/Demos/DataGrid/AIColumns/React(Js)/. | Added null coalescing for AI responses and null-safe property access |
| apps/demos/Demos/CardView/Selection/React(Js)/App.(tsx|js) | Added boolean coercion for allowSelectAll property |
| apps/demos/Demos/CardView/ColumnChooser/React(Js)/App.(tsx|js) | Added boolean coercion for multiple checkbox properties |
No description provided.