-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
multiTemplateDataRows property not working when ivy is enabled #16044
Labels
P2
The issue is important to a large percentage of users, with a workaround
Comments
crisbeto
added
has pr
P2
The issue is important to a large percentage of users, with a workaround
labels
May 17, 2019
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
May 17, 2019
Fixes an error that is thrown by the table in Ivy, if `multiTemplateDataRows` is set as a static attribute. The timing for static attributes is slightly different in Ivy, which means that we need an extra null check. Fixes angular#16044.
Until the fix is pushed out, I was able to get around this by changing
to
|
mmalerba
pushed a commit
that referenced
this issue
May 21, 2019
Fixes an error that is thrown by the table in Ivy, if `multiTemplateDataRows` is set as a static attribute. The timing for static attributes is slightly different in Ivy, which means that we need an extra null check. Fixes #16044.
mmalerba
pushed a commit
that referenced
this issue
May 21, 2019
Fixes an error that is thrown by the table in Ivy, if `multiTemplateDataRows` is set as a static attribute. The timing for static attributes is slightly different in Ivy, which means that we need an extra null check. Fixes #16044.
RudolfFrederiksen
pushed a commit
to RudolfFrederiksen/material2
that referenced
this issue
Jun 21, 2019
…6047) Fixes an error that is thrown by the table in Ivy, if `multiTemplateDataRows` is set as a static attribute. The timing for static attributes is slightly different in Ivy, which means that we need an extra null check. Fixes angular#16044.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What is the expected behavior?
No error
What is the current behavior?
Property multiTemplateDataRows fails when ivy is enabled with the following errors:
ng serve:
ERROR TypeError: Cannot read property 'viewContainer' of undefined at MatTable.set multiTemplateDataRows [as multiTemplateDataRows] (table.js:1328) at setInputsFromAttrs (core.js:12995) at postProcessDirective (core.js:12784) at instantiateAllDirectives (core.js:12678) at createDirectivesAndLocals (core.js:12097) at ΔelementStart (core.js:15361) at AppComponent_Template (template.html:1) at executeTemplate (core.js:12019) at checkView (core.js:13370) at componentRefresh (core.js:13134)
What are the steps to reproduce?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I am using the latest release candidates of angular 8:
Angular CLI: 8.0.0-rc.4
Node: 10.13.0
OS: win32 x64
Angular: 8.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
@angular-devkit/architect 0.800.0-rc.4
@angular-devkit/build-angular 0.800.0-rc.4
@angular-devkit/build-optimizer 0.800.0-rc.4
@angular-devkit/build-webpack 0.800.0-rc.4
@angular-devkit/core 8.0.0-rc.4
@angular-devkit/schematics 8.0.0-rc.4
@angular/cdk 8.0.0-rc.1
@angular/material 8.0.0-rc.1
@ngtools/webpack 8.0.0-rc.4
@schematics/angular 8.0.0-rc.4
@schematics/update 0.800.0-rc.4
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0
Is there anything else we should know?
The viewChild "_rowOutlet" seems to be undefined when the following function is called in table.js, leading to the error:
set multiTemplateDataRows(v) { this._multiTemplateDataRows = coerceBooleanProperty(v); if (this._rowOutlet.viewContainer.length) { this._forceRenderDataRows(); } }
If I remove the multiTemplateDataRows property and the second detail row in the example, the table renders correctly but without the expanding rows functionality.
The text was updated successfully, but these errors were encountered: