Undefined MatSort Directive From MatTable Inside a MatStepper
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
Using @ViewChild(MatSort)
get the Directive from inside a Stepper
What is the current behavior?
Returns Undefined
What are the steps to reproduce?
http://plnkr.co/edit/mLbnnpLG5bDumD2jBYZt?p=info
What is the use-case or motivation for changing an existing behavior?
Select from list to advance to next step
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
mat-sort not working on mat-table - Stack Overflow
Any help is greatly appreciated! MatSortModule is already imported in app.module.ts, mat-sort-header directives are applied to the columns and ...
Read more >Matsort Is Undefined - Angular 5 - ADocLib
Menu Undefined MatSort Directive From MatTable Inside a MatStepper. Fantashit January 4 Using @ViewChild(MatSort) get the Directive from inside a Stepper.
Read more >Sort header - Angular Material
These headers should be contained within a parent element with the matSort directive, which will emit a matSortChange event when the user triggers...
Read more >Stepper | Angular Material
UI component infrastructure and Material Design components for mobile and desktop Angular web applications.
Read more >UNPKG - @angular/material
_filter.next(filter); }\n\n /**\n * Instance of the MatSort directive used ... CdkStepperPrevious} from '@angular/cdk/stepper';\nimport {MatStepper} from '.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue. Tried to import all modules, but still doesn’t work. Could it be related to something else?
UPDATE: I found the problem. It is
undefined
because of*ngIf
directive on the tag above mat-table (even if it evaluates to true).Good find! Removing *ngIf fixed the issue. This is a bug and should be re-opened.
UPDATE: ng-if instead of *ngIf works