Questions tagged [mat-table]

Angular Material - mat-table

The mat-table provides a Material Design styled data-table that can be used to display rows of data.

607 questions
2
votes
2 answers

How to use ng-if for display table

I have two tables (1 and 2) and two buttons A and B. I want when I click on the button A displays me the dataSource and button B and when I click on the button B displays me the maltr and button A I have already created the 2 tables with Angular…
adam
  • 33
  • 5
2
votes
2 answers

Changing paginator pageSize property doesn't refresh the table

I am new to web development (Angular). I am trying to bind a mat-select display records option to with mat-paginator with the following: HTML:
Display
Grayrigel
  • 3,474
  • 5
  • 14
  • 32
2
votes
2 answers

Mat-Table Data Source getting overridden when applied on nested grids in Angular

I have created a 2 level nested Mat-Table grid in Angular in which it can expand multiple rows at a time. On each row click from the parent grid it calls an API and loads the data for the inner grid. When I click on the first row, it fetches the…
angular_code
  • 319
  • 3
  • 18
2
votes
1 answer

Angular mat-table inline filter with drop down

How to get a drop down in the inline filter with unique values from the grid. For example my JSON returns 100 rows of Person object. That has 5 columns. I want to filter all these columns. I want 3 columns to be text box and other 2 columns to be…
SK.
  • 1,390
  • 2
  • 28
  • 59
2
votes
1 answer

Angular Material Table not updating when receiving new data

I'm currently learning to use Angular with Material UI and want to display a table. I'm loading my data through an combination of In-Memory DB and HTTP Interception. My problem is that my table does not update when it receives new data. For the…
hullunist
  • 1,117
  • 2
  • 11
  • 31
2
votes
1 answer

How to adjust angular mat-table header height ? The table I am working on has column groups(main header and sub headers)

I have used sample code from https://stackblitz.com/edit/angular-bklajw?file=app%2Ftable-basic-example.html. But the height property does not seem to work. Is there a way I can customize the height of the main header and…
Dips
  • 33
  • 3
2
votes
1 answer

Data disappears from mat table when grouping

Rows disappear from mat-table when the search bar is put on focus and then the table is grouped.filtereddata property of datasource becomes empty when i group it. When filtered or put focus on search bar, the table gets filtered but then if I group…
2
votes
3 answers

For Angular 9 mat-tables, is there a way to set the CSS color for a row in just a single place?

In my mat-table (Angular 9), I want to have a function that determines the CSS class for each row ... getRowClass(item: Item): string { let class_ = ""; if (...condition1...) { ... } else { class_ = 'warm'; } …
satish
  • 703
  • 5
  • 23
  • 52
2
votes
2 answers

Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' MatTable Angular 11

I am trying to use Angular MatTable with an async pipe. I get the data from RESTAPI as Observable. However, when I use ([dataSource] = "dataSource | async") in this way, I get the error I mentioned above. repository.service.ts: public…
Bilal GÖZET
  • 63
  • 1
  • 9
2
votes
1 answer

Displaying nested array with mat-table

I'm working with an object which has a nested array, something like this The Foo_Chain.Foo needs to be shown in different columns ClientId | Foo_Type | Foo 1 | Foo 2 Foo_Type isn't being a problem, because I can access it easily, but the other 2…
2
votes
3 answers

How to filter Angular Material table field with value timestamp?

dataSource [ {name:'User1',date:1605082722360}, {name:'User2',date:1605022729782} ] list.component.html
Tony
  • 894
  • 4
  • 19
2
votes
3 answers

Angular Material - mat-table sort row

How to sort angular material mat table based on a row?, I know we can sort based on columns using mat-sort but the requirement is to sort based on the row when you double click on it.
RRR
  • 3,509
  • 4
  • 29
  • 38
2
votes
1 answer

How to change one mat-cell value based on a another summarised mat-cell

I'm developing in Angular & Angular Material, which I'm new to (on 8 atm), and usually manage to find answers to most of my problems, but can't find an answer for this problem. I have a Master-detail mat-table of transactions, with the master…
Mapster
  • 21
  • 1
  • 2
2
votes
1 answer

Add a fixed static row in a angular Mat Table

I have a dynamic table using mat-table where i render the columns from the data object. ... I render the columns
2
votes
2 answers

Column not showing - mat-table

I am attempting to add row-deletion into my . Most of the table is working fine, except the checkbox column is not showing up. Previously, the code did not contain the section. I added it in using one of…
Chris Phillips
  • 1,997
  • 2
  • 19
  • 34