Skip to content

[Table] Does not work when targetting ES6 since Angular Material 6.4.2-6.4.5 (6.4.1 is working fine) #12697

Open
@Lukespacewalker

Description

@Lukespacewalker

Bug, feature request, or proposal:

[Table] Does not work when targeting ES6 since Angular Material 6.4.2-6.4.5 (6.4.1 is working fine)

What is the expected behavior?

Angular Material Table should be rendered correctly
(I have to revert @angular/material back to 6.4.1 as 6.4.2 - 6.4.5 are unable to render the table.

What is the current behavior?

OverdueComponent.html:39 ERROR TypeError: Cannot read property 'find' of undefined
    at MatHeaderRowDef.ngOnChanges (table.js:324)
    at MatHeaderRowDef.ngOnChanges (table.js:376)
    at checkAndUpdateDirectiveInline (core.js:11642)
    at checkAndUpdateNodeInline (core.js:13252)
    at checkAndUpdateNode (core.js:13191)
    at debugCheckAndUpdateNode (core.js:14147)
    at debugCheckDirectivesFn (core.js:14090)
    at Object.eval [as updateDirectives] (OverdueComponent.html:46)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:14078)
    at checkAndUpdateView (core.js:13156)

_differs is undefined at table.js:324

    ngOnChanges(changes) {
        // Create a new columns differ if one does not yet exist. Initialize it based on initial value
        // of the columns property or an empty array if none is provided.
        if (!this._columnsDiffer) {
            const /** @type {?} */ columns = (changes['columns'] && changes['columns'].currentValue) || [];
            this._columnsDiffer = this._differs.find(columns).create();
            this._columnsDiffer.diff(columns);
        }
    }

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Target : ES6
Browser: Firefox, Chrome, Edge

  "dependencies": {
    "@angular/animations": "6.1.3",
    "@angular/cdk": "6.4.5",
    "@angular/common": "6.1.3",
    "@angular/compiler": "6.1.3",
    "@angular/core": "6.1.3",
    "@angular/forms": "6.1.3",
    "@angular/http": "6.1.3",
    "@angular/material": "6.4.5",
    "@angular/material-moment-adapter": "6.4.5",
    "@angular/platform-browser": "6.1.3",
    "@angular/platform-browser-dynamic": "6.1.3",
    "@angular/platform-server": "6.1.3",
    "@angular/router": "6.1.3",
    "@coachcare/datepicker": "^0.9.9",
    "@nguniversal/module-map-ngfactory-loader": "^6.0.0",
    "aspnet-prerendering": "^3.0.1",
    "core-js": "^2.5.7",
    "jasmine": "^3.2.0",
    "moment": "^2.22.2",
    "moment-recur-ts": "^1.3.1",
    "moment-timezone": "^0.5.21",
    "ngx-mat-select-search": "^1.3.0",
    "open-iconic": "^1.1.1",
    "rxjs": "^6.2.2",
    "rxjs-compat": "^6.2.2",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.7.3",
    "@angular/cli": "^6.1.3",
    "@angular/compiler-cli": "6.1.3",
    "@angular/language-service": "6.1.3",
    "@types/jasmine": "^2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^10.7.1",
    "codelyzer": "^4.4.4",
    "jasmine-core": "~3.2.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^2.0.1",
    "karma-jasmine": "^1.1.2",
    "karma-jasmine-html-reporter": "^1.3.0",
    "protractor": "^5.4.0",
    "ts-node": "^7.0.1",
    "tslint": "~5.11.0",
    "typescript": "2.9.2"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/table

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions