Questions tagged [angular-material-table]

An Angular component that provides the Material Design styled data-table. For displaying tabulated data. Also, include [angular] and [angular-material] tags when posting the question.

The Material Data Table component is a generic component for displaying tabulated data.

Useful Links:

https://blog.angular-university.io/angular-material-data-table/

https://material.angular.io/cdk/table/overview

https://material.angular.io/cdk/table/api

528 questions
0
votes
1 answer

Angular Material - editing value of mat-cell

I have data presented in table using Angular 9 Mat Table I iterate through dataSource elements iot get columns dynamically. When I click on specified cell there is previous value in edit cell. WHAT I WANT Edit selected cell and upgrade this value…
0
votes
1 answer

Angular Material table throws nativeElement undefined

I am trying to get a very very basic Material table working in Angular 8. The component doesn't render and I find the following exception in the console logs: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'nativeElement' of…
Myles J
  • 2,839
  • 3
  • 25
  • 41
0
votes
1 answer

Expand Angular Material row on click of a button

I am trying to make my Angular Material data table expand on the row when I click a button. Here is my code and a stackblitz example. Currently it expands within the column but I'm trying to expand the row when the user clicks the toggle…
skydev
  • 1,867
  • 9
  • 37
  • 71
0
votes
1 answer

Add certain data from API into Angular Material Table expanded section

I have the following response data set that comes from an API call. I am trying to add one object called contributorProfiles from within the data set to be my expanded data in the material table. [ { "title": "bob", "codes": [ …
skydev
  • 1,867
  • 9
  • 37
  • 71
0
votes
1 answer

Angular 9: what is the difference between these two pagination implementation?

I'm new to angular and I try to create a table with pagination, the data returns from a server, so I don't want to bring all data together (because maybe I have more than thousands of rows), so which type of pagination you prefer to be good? I found…
0
votes
1 answer

how to displaying data inside nested object in angular material table

what should i do for diplaying the data of company name, because idk why its show undefined. i think i do it in correct way because its object, so what i need is just use "." but when i trying to show company name, data of (name, birthdate,city,…
0
votes
1 answer

how to datepie with angular material table when repeating columns

When I just simply make a table I did not repeat but added date: "d/M/yyyy" but when I repeat, how do I check that put the pipe line to get the date format? when not repeating
dumb11
  • 129
  • 1
  • 9
0
votes
1 answer

Unable to test data in Angular Material Data Table: TypeError: Cannot read property 'nativeElement' of null

I am writing unit test cases for Angular material table. Here's the template code snippet:
Pritam Bohra
  • 3,912
  • 8
  • 41
  • 72
0
votes
1 answer

What might cause a property length of null exception when using a Material Data Table?

My issue is similar to the one discussed here, but none of the suggestions there has helped, and my situation is slightly different. I have a parent component assigning an array to a child component's input property, which then uses that data to…
RobC
  • 1,303
  • 3
  • 15
  • 32
0
votes
2 answers

mat-table from `{foo: {bar: 5, can: 6}, haz: {bar: 7, can: 8}}`?

Goal: ------------------- | | foo | haz | ------------------- | bar | 5 | 7 | | can | 6 | 8 | ------------------- It seems like a trivial thing to want… but at second glance it seems quite complicated with all the explicit…
A T
  • 13,008
  • 21
  • 97
  • 158
0
votes
1 answer

Angular Mat-table with expandable rows - stop expansion on row button click

I want the row expansion disabled when a user clicks on buttons located on the row. Especially if we have a popup menu per row, it's really distracting when row expansion happens simultaneously. Is there a way to stop this from happening. see the…
0
votes
1 answer

display category name instead id in mat table angular

Hello I use angular material mat table so to display my data from an api. I use another api so to handle the Categories. I have two models, issues and categories. For the time I display the ID of the category. I need to display the corresponding…
touinta
  • 971
  • 3
  • 10
  • 26
0
votes
1 answer

ERROR TypeError: Cannot read property 'length' of undefined. Using Angular Material Table and array of data from MongoDB

I'm working on an assignment for my university project. When i try to get array of data from MongoDB collection i got an error when i try to load the app page. Error detail ERROR TypeError: Cannot read property 'length' of undefined at…
0
votes
1 answer

Material Table wont sort after following guide

Hi everyone i have been trying to implement the guide from https://material.angular.io/components/table/overview I am trying to sort my table but when i go click on the table header nothing happens, can you guys see anything i am missing in my code?…
user4815703
0
votes
1 answer

Footer Cell not getting displayed inside *ngFor in Mat-Table

I'm trying to show the sum at bottom of my table. I followed exactly the same steps as mentioned in the documentation but still not working. Below is my template code …