mat-table Questions

7

Angular 7 brought the powerful DragDropModule with it: https://material.angular.io/cdk/drag-drop/examples The documentation deals with rearranging items within lists or transferring items between ...
Gravestone asked 19/11, 2018 at 15:6

2

Solved

I want to use a <mat-table> to display the name of an option and it's corresponding given value (for the user to change). Since the options may need to have their values set by different mean...
Jessi asked 29/4, 2019 at 12:26

8

Solved

I have an Angular Material mat-table which I used CSS styling for alternate row colors. Here is the CSS styling: .mat-row:nth-child(even){ background-color: #e4f0ec; } .mat-row:nth-child(odd){ ...
Loaning asked 28/5, 2019 at 14:21

8

Solved

I am trying to make the mat-table border as round. But it is not working. Tried this- table { width: 100%; border-collapse: collapse; border-radius: 1em; } How to achieve this?
Teal asked 4/3, 2020 at 12:6

5

Solved

I'm trying to sort the MatTableDataSource programmatically so that I can sort the data via the use of a button rather than by the table column header when viewing the data in a specific mobile layo...
Van asked 4/3, 2019 at 11:24

3

Solved

I have a component that renders mat-table in it's template. I want to pre-select some of the rows. The SelectionModel I have contains objects representing each selected item (not simple strings or ...
Greasy asked 1/7, 2020 at 23:3

3

What I want is drawn out in the following image. I use Angular Material (7.x) and use the Mat-Table implementation as described here: https://material.angular.io/components/table/overview The ab...
Janitress asked 21/6, 2019 at 11:29

3

Solved

I'm having trouble getting my table indexes to show up. Here's an example table: <mat-table [dataSource]="dataSource" multiTemplateDataRows> <!--Column definitions--> <ng-contai...
Horseman asked 28/11, 2018 at 16:57

7

My samplepage.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-batchticketvalidation', templateUrl: './batchticketvalidation.component.html', styleUrls: ['./b...
Adytum asked 18/2, 2019 at 10:8

5

Solved

I have a mat-table that might show up to 100 entries per page. At first, I had one mat-paginator at the bottom that worked fine. Now I'm being asked to set a paginator at the top and another one at...
Storiette asked 25/1, 2019 at 23:26

4

I'm using Angular 9. How do I construct a mat-table without a header row (th) for the table? Sounds silly but if I do this <table mat-table *ngIf="isMobile" #mobile_table [dataSource]=...
Tailor asked 12/4, 2021 at 16:28

2

When i sort a column of my mat-table i can no longer extend my rows only about one in two still works. While everything works fine when no sorting is done. I came across this link : https://github....
Downfall asked 25/8, 2020 at 12:30

2

Solved

Anybody know if it is possible to create a “column” component for use with mat-table, I have tried creating a component for a commonly used column definition but when adding to the table i get an e...
Palaestra asked 1/11, 2018 at 11:17

3

Solved

I want to implement table with only one row selection. Now i have multiple selection. I tried coupe ways to do this and i stayed by this one. Graphic example: component.ts import { Component,...
Cariecaries asked 24/7, 2019 at 19:1

2

I am making a table using angular-material in HTML, I am getting the error Cannot read property 'template' of undefined at MatHeaderRowDef.extractCellTemplate ts file contains export class BankLi...
Streeter asked 19/6, 2019 at 18:41

1

I am having the spitted header angular material table and I was looking for help to add the sticky header. I have tried to using sticky: true but somehow it is not working for my first column (as I...
Akkerman asked 23/12, 2020 at 20:43

1

We have been using multiTemplateDataRows for multilevel mat-table. Its working fine and we can expand it to multi level. Although, there seems to be one issue in specific scenario. Scenario: Sort ...
Wootten asked 25/8, 2020 at 9:24

1

The title already says it, which one should I use and is there / what is the difference between having <table mat table [dataSource]="items" ... or <mat table [dataSource]="items" ... i...
Vashti asked 10/4, 2019 at 7:49

2

Solved

Ciao, I'm working with Angular 8 and I've a problem sorting "computed" columns. Assuming that I have a object with two properties name and description, the sorting not works if I try to concatenat...
Seriate asked 22/5, 2020 at 8:50

1

Solved

I only want to show data on the table if status == 'done'. I tried doing but what i did was just remove the status but it is still displaying the row. How to do this? data { equipmentOrdered: ...
Kurtis asked 22/5, 2020 at 3:29

2

Solved

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 ...
Madra asked 16/11, 2018 at 16:33

1

I would like to add multilines with different styles to my table cells. The Angular Material table seems to strip my HTML code away though. How can I achieve something similar like in Gitlab where ...
Recessive asked 1/8, 2019 at 21:55

2

Solved

I change direction columns in the mat-table and after that I can't add ng-container to the table. I made this like this. How to add predefined row in this case with my content ? component.ts exp...
Progress asked 13/8, 2019 at 5:58

0

I have created a mat-table with expandable rows just like this one in Angular 8: https://stackblitz.com/angular/pmagobelkkg?file=app%2Ftable-expandable-rows-example.ts However, as in the example...
Brendanbrenden asked 20/8, 2019 at 20:1

2

mat-sort is not working on the one column of a mat-table that comes from a database, the rest of the columns are working completely fine. The only difference is, I am fetching data for this one col...
Mackay asked 6/5, 2019 at 12:3

© 2022 - 2025 — McMap. All rights reserved.