Skip to content

Commit 884762f

Browse files
devversionjelbourn
authored andcommitted
fix(schematics): table schematic not expanding full width (#13234)
Currently the `table` schematic generates a `<table>` element that does not expand to the available width. By default, we should expand to the full width. Similarly to every table example on our docs. This makes it easier to play with the table and also gives people a better first glance of a table. Also currently it doesn't look that good (in perspective of layout) because the paginator expands to full width, but the table not.
1 parent 267dd65 commit 884762f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.full-width-table {
2+
width: 100%;
3+
}

src/lib/schematics/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="mat-elevation-z8">
2-
<table mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
2+
<table mat-table class="full-width-table" [dataSource]="dataSource" matSort aria-label="Elements">
33
<!-- Id Column -->
44
<ng-container matColumnDef="id">
55
<th mat-header-cell *matHeaderCellDef mat-sort-header>Id</th>
@@ -22,4 +22,4 @@
2222
[pageSize]="50"
2323
[pageSizeOptions]="[25, 50, 100, 250]">
2424
</mat-paginator>
25-
</div>
25+
</div>

0 commit comments

Comments
 (0)