mat-table

Mat-Table : Scroll a row into view in angular 2

谁说胖子不能爱 提交于 2020-04-13 18:11:33
问题 Is it possible to scroll a specific data row into view when using the angular material mat-table cdk-table ? I'm trying to implement keyboard scrolling with no luck. 回答1: I've it working now. Not perfect but it works. See the example on stack blitz mentioned in my earlier message. https://stackblitz.com/edit/mensand-rowselect?file=app%2Ftable-basic-example.html 来源: https://stackoverflow.com/questions/49697459/mat-table-scroll-a-row-into-view-in-angular-2

Mat-Table : Scroll a row into view in angular 2

久未见 提交于 2020-04-13 18:11:31
问题 Is it possible to scroll a specific data row into view when using the angular material mat-table cdk-table ? I'm trying to implement keyboard scrolling with no luck. 回答1: I've it working now. Not perfect but it works. See the example on stack blitz mentioned in my earlier message. https://stackblitz.com/edit/mensand-rowselect?file=app%2Ftable-basic-example.html 来源: https://stackoverflow.com/questions/49697459/mat-table-scroll-a-row-into-view-in-angular-2

How to paste the clipboard data into the table cells using jquery?

Deadly 提交于 2020-03-21 06:21:33
问题 I am facing the issue while copying the clipboard data into the table rows. here my html table code: <table mat-table [dataSource]="dataSource"> <tr mat-header-row *cdkHeaderRowDef="displayedColumns" ></tr> <tr mat-row *cdkRowDef="let row; columns: displayedColumns;"></tr> <ng-container *ngFor="let disCol of displayedColumns; let colIndex = index" [cdkColumnDef]="disCol"> <div *ngIf="disCol != 'addrow'"> <th mat-header-cell *cdkHeaderCellDef style="background-color: rgb(198, 182, 255);">{

Angular Mat-Table 3-level nested sortable tables

风格不统一 提交于 2020-01-25 09:10:50
问题 I have a sample code at StackBlitz that I expanded a little to include another new level Company under Address under User. It is based on the answer to a question. I like to have another nested sortable table under the Address. When a user clicks on an address row, I like to expand that row and show a table of company name, floor and unit. So far I have no luck. Appreciate if someone help me on writing the codes? Thanks 来源: https://stackoverflow.com/questions/59042625/angular-mat-table-3

Render a map object (with dynamic keys and values) into angular mat-table (columns and rows as keys and values of the map)

时间秒杀一切 提交于 2020-01-13 19:39:29
问题 I am developing a POC using angular8 as frontend and SpringBoot as backend. My backend function returns me a List of Map objects ( List < Map < String, Object > > ) which has dynamic keys and values. I need to use this map array in frontend angular using mat-table inside mat-dialog-content. I'm stuck on defining the keys and values as the required attributes for the mat table. Please help me in populating the dynamic list of map objects (column headers as map key, and row as map value).

Render a map object (with dynamic keys and values) into angular mat-table (columns and rows as keys and values of the map)

痴心易碎 提交于 2020-01-13 19:39:00
问题 I am developing a POC using angular8 as frontend and SpringBoot as backend. My backend function returns me a List of Map objects ( List < Map < String, Object > > ) which has dynamic keys and values. I need to use this map array in frontend angular using mat-table inside mat-dialog-content. I'm stuck on defining the keys and values as the required attributes for the mat table. Please help me in populating the dynamic list of map objects (column headers as map key, and row as map value).

How can I create an Angular Material Design table with infinite columns, for known number of rows?

夙愿已清 提交于 2020-01-06 05:40:10
问题 I have created an HTML table which will generate infinite columns based on the number of rows in the input data. I've tried to use this SO post as an example, but I'm struggling to convert my HTML to Angular Material design. Any suggestions? StackBlitz demo Since Angular material tables are column-based (and I couldn't find a way to iterate over the rows within them) I got stuck pretty quickly. I couldn't get angular material tables working in the StackBlitz, so here is a copy paste of my

How can I create an Angular Material Design table with infinite columns, for known number of rows?

眉间皱痕 提交于 2020-01-06 05:40:07
问题 I have created an HTML table which will generate infinite columns based on the number of rows in the input data. I've tried to use this SO post as an example, but I'm struggling to convert my HTML to Angular Material design. Any suggestions? StackBlitz demo Since Angular material tables are column-based (and I couldn't find a way to iterate over the rows within them) I got stuck pretty quickly. I couldn't get angular material tables working in the StackBlitz, so here is a copy paste of my

Angular 6 - Ng-Container - Ng-Template inside Mat-table is not working

此生再无相见时 提交于 2020-01-04 09:08:23
问题 I am loading data into the mat-table data source from an API. There is an addnewrow() method which would add a new row at the top. I am actually trying to make the first column of the table editable. (i.e) user can give input only if they create a new row. The rest of the data in the table should not be editable. So for that I use a local flag variable false by default. Based on the flag, I am creating ng-template with ng-container. . If it's a new row, the first column is the only editable

Error There is no directive with “exportAs” set to “matTableExporter” when using MatTableExporter

与世无争的帅哥 提交于 2020-01-03 01:40:12
问题 From the docs example I'm trying to use the mat table exporter, this way: <ng-container> <mat-card class="mat-card py-0"> <mat-card-header class="label"> <ng-container> <mat-card-title>{{titoloTabella}}</mat-card-title> <button mat-button class="align-right" (click)="changeClass()"> <mat-icon [ngClass]="(rotate)?'rotate':'no-rotate'">keyboard_arrow_down</mat-icon> </button> </ng-container> </mat-card-header> <table mat-table matSort [dataSource]="dataSource" matTableExporter #exporter=