Skip to content
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

Cannot read properties of null (reading '_headerRowOutlet') with angular material 15 #185

Open
chaitanyas-hdoc opened this issue Jul 26, 2023 · 1 comment
Labels
feature request New feature or request

Comments

@chaitanyas-hdoc
Copy link

chaitanyas-hdoc commented Jul 26, 2023

Not able to export when using angular material 15 with MatLegacyTable. Observed there's no issue when using MatTable.Please add support for MatLegacyTable

Error:

ERROR TypeError: Cannot read properties of null (reading '_headerRowOutlet')
    at MatTableExporterDirective.extractTableHeader (cdk-table-exporter.mjs:487:48)
    at MatTableExporterDirective.exportTable (cdk-table-exporter.mjs:386:14)
    at ClaimsListComponent.exportTableDataToCsv (claims-list.component.ts:490:24)
    at ClaimsListComponent_Template_button_click_5_listener (claims-list.component.html:24:16)
    at executeListenerWithErrorHandling (core.mjs:13975:16)
    at wrapListenerIn_markDirtyAndPreventDefault (core.mjs:14008:22)
    at HTMLButtonElement.<anonymous> (platform-browser.mjs:457:38)
    at _ZoneDelegate.invokeTask (zone.js:409:31)
    at core.mjs:23896:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:23896:36)
    
ERROR TypeError: Cannot read properties of null (reading 'dataSource')
    at MatTableExporterDirective.getDataSource (mat-table-exporter.mjs:68:31)
    at MatTableExporterDirective.getPaginator (mat-table-exporter.mjs:71:21)
    at MatTableExporterDirective.enablePaginator (mat-table-exporter.mjs:74:32)
    at Object.next (mat-table-exporter.mjs:18:18)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:183:16)
    at SafeSubscriber.next (Subscriber.js:122:22)
    at Subscriber._next (Subscriber.js:72:26)
    at Subscriber.next (Subscriber.js:49:18)
    at EventEmitter_.next (Subject.js:39:25)
    at EventEmitter_.emit (core.mjs:20900:15)

dependencies:

  • "mat-table-exporter": "^15.0.0",
  • "@angular/cdk": "15.2.9",
  • "@angular/common": "15.2.9",
  • "@angular/compiler": "15.2.9",
  • "@angular/core": "15.2.9",
@HalitTalha HalitTalha added the feature request New feature or request label Aug 31, 2023
@gchokeen
Copy link

gchokeen commented Apr 2, 2024

I have same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants