angular-mat-table-crud | CRUD operations for the Angular Material Table | DB Client library
kandi X-RAY | angular-mat-table-crud Summary
kandi X-RAY | angular-mat-table-crud Summary
CRUD operations for the Angular Material Table
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular-mat-table-crud
angular-mat-table-crud Key Features
angular-mat-table-crud Examples and Code Snippets
Community Discussions
Trending Discussions on angular-mat-table-crud
QUESTION
Sorry if this question is trivial, I'm very new to Angular and Web UI Kingdom
I'm currently looking at this sample project: https://github.com/marinantonio/angular-mat-table-crud
I was replacing the way the columns were created (from static to dynamic) and the table layout changed into something that is hard to read. I am having trouble understanding how/why this is happening. What makes the difference in how I created my columns? But, most importantly, how do i fix it?
Here is what I have:
componnent.html:
...ANSWER
Answered 2018-Nov-16 at 18:39I found the solution!!!
use cdkColumnDef and cdkHeaderCellDef instead of matColumnDef and mat-header-cell
QUESTION
I am creating Angular material table using this example: https://github.com/marinantonio/angular-mat-table-crud. The sample is connecting to the table using { DataSource } from '@angular/cdk/table'.
For my project i need to used MatTableDataSource from '@angular/material'as a table data connector, once i change the code to use MatTableDataSource i keep getting TypeError: Cannot set property 'paginator' of undefined.
There is a repro for my issue https://stackblitz.com/edit/angular-3rhawr
What am I doing wrong ? Any help will be appreciated.
...ANSWER
Answered 2018-Dec-26 at 17:14this.exampleDatabase.getAllIssues()
is async in nature and may take time to complete. But ngAfterViewInit
is going to be called before that. And since the dataSource
is set in the subscribe
block of this.exampleDatabase.getAllIssues()
, hence the error.
Fix it by moving the code from ngAfterViewInit
in the subscribe
block. Something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-mat-table-crud
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page