Inline editing in the Angular Material data table

Sundar picture Sundar · Apr 12, 2018 · Viewed 61.1k times · Source

Consider an example below. Is it possible to make the angular material data table with inline editing feature? Or making cells under specific columns as editable on load itself (see the image below where Email column fields are editable). If so could you share the sample code?

Angular Material data Table with dynamic rows

enter image description here

Answer

Hobbamok picture Hobbamok · Apr 10, 2019

Well this isn't clean inline editing, but - I'm looking for the same thing - this is close enough for my purposes:

https://stackblitz.com/edit/inline-edit-mat-table?file=app%2Fapp.component.html

[The idea is to have a small popup when you click on the cell]

My alternative Idea would be (though with more work) to replace all cells with Inputfields and bind them to the correct value, which would - for the user- have the exact desired use-case