mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
(Angular Material Examples) Updated the examples
This commit is contained in:
parent
23b86a7e3d
commit
8b14366763
|
@ -20,7 +20,7 @@ export interface PeriodicElement {
|
|||
position: number;
|
||||
weight: number;
|
||||
symbol: string;
|
||||
}
|
||||
}
|
||||
|
||||
const ELEMENT_DATA: PeriodicElement[] = [
|
||||
{position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'},
|
||||
|
|
|
@ -29,5 +29,5 @@
|
|||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
|
||||
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
||||
|
||||
|
@ -30,4 +30,4 @@
|
|||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
|
|
@ -44,4 +44,4 @@
|
|||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"
|
||||
(click)="selection.toggle(row)">
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
@ -26,4 +26,4 @@
|
|||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{ positionOption }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
|
||||
<button mat-raised-button
|
||||
matTooltip="Info about the action"
|
||||
|
|
|
@ -100,7 +100,10 @@ export class DynamicDataSource {
|
|||
new DynamicFlatNode(name, node.level + 1, this.database.isExpandable(name)));
|
||||
this.data.splice(index + 1, 0, ...nodes);
|
||||
} else {
|
||||
this.data.splice(index + 1, children.length);
|
||||
let count = 0;
|
||||
for (let i = index + 1; i < this.data.length
|
||||
&& this.data[i].level > node.level; i++, count++) {}
|
||||
this.data.splice(index + 1, count);
|
||||
}
|
||||
|
||||
// notify the change
|
||||
|
|
Loading…
Reference in New Issue
Block a user