chore: added export example (#DS-4945) - #197
Conversation
📝 WalkthroughWalkthroughChangesExport demo
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant AngularRouter
participant DevExport
participant GridApi
participant ExportLibraries
Browser->>AngularRouter: Navigate to /e2e/export
AngularRouter->>DevExport: Lazy-load component
DevExport->>GridApi: Read displayed columns and filtered/sorted rows
GridApi-->>DevExport: Return formatted export table
DevExport->>ExportLibraries: Generate CSV, XLSX, or PDF
ExportLibraries-->>Browser: Download generated file
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)package.jsonTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Visit the preview URL for this PR (updated for commit eb50f96): https://data-grid-next--data-grid-pr-197-s8zau4i0.web.app (expires Fri, 24 Jul 2026 12:49:03 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: b9d49913f5b5988e9af8690a8b37f16143707448 |
There was a problem hiding this comment.
Pull request overview
Adds a new dev/e2e export example screen to the dev/ag-grid-angular demo app, including CSV/XLSX/PDF export actions, and wires it into the dev router.
Changes:
- Added
DevExportstandalone test component that renders a grid and provides export buttons (CSV/XLSX/PDF). - Registered a new
/exportdev route to load the export example lazily. - Added export-related runtime dependencies (
jspdf,jspdf-autotable,xlsx) and updatedyarn.lock.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| yarn.lock | Locks newly added export-related dependencies and transitive packages. |
| package.json | Adds jspdf, jspdf-autotable, and xlsx dependencies needed by the new export example. |
| dev/ag-grid-angular/src/tests/export.ng.ts | Introduces the new export demo component with CSV/XLSX/PDF generation logic. |
| dev/ag-grid-angular/src/main.ts | Adds a new /export route to expose the export demo in dev/e2e. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dev/ag-grid-angular/src/tests/export.ng.ts`:
- Around line 77-79: The export handlers in
dev/ag-grid-angular/src/tests/export.ng.ts at lines 77-79 and 101-104 must guard
against an uninitialized GridApi. In downloadCsv, add an early return when
this.api is unavailable; in the export table generator, return null when either
this.api or columns is unavailable, while preserving normal export behavior for
initialized state.
- Line 44: Update the animateRows input in the affected Angular test template to
use property binding, [animateRows]="false", so the component receives a boolean
false instead of the string "false".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d6b53261-3862-4005-a372-f2017bbc0e79
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
dev/ag-grid-angular/src/main.tsdev/ag-grid-angular/src/tests/export.ng.tspackage.json
Summary by CodeRabbit