-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When conditional rendering is done using *ngIf on table on outer <div>
, Mat-Paginator should paginate properly
What is the current behavior?
If table is inside a conditional *ngIf and is hidden to start with, then after the condition is satisfied and view is initialized, data is not paginated. And the paginator is displayed as below
What are the steps to reproduce?
With conditional rendering where we can see the problem clearly
https://stackblitz.com/edit/angular-material2-issue-s1hkz9?file=app/app.component.html
Without conditional rendering, it works properly
https://stackblitz.com/edit/angular-material2-issue-3xb5aa?file=app/app.component.html
What is the use-case or motivation for changing an existing behavior?
We need to display a table with pagination only if certain condition is met
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/animations": "^5.2.0",
"@angular/cdk": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"typescript": "~2.5.3"
Is there anything else we should know?
NA
suku-h, wandri, JDillon522, kilaridelli, guilhermechiara and 31 more
Metadata
Metadata
Assignees
Labels
No labels