Skip to content

docs(select): switch examples to fill appearance #19708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Toppings</mat-label>
<mat-select [formControl]="toppings" multiple>
<mat-select-trigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Choose an option</mat-label>
<mat-select [disabled]="disableSelect.value">
<mat-option value="option1">Option 1</mat-option>
Expand All @@ -13,7 +13,7 @@ <h4>mat-select</h4>
</mat-form-field>

<h4>native html select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Choose an option</mat-label>
<select matNativeControl [disabled]="disableSelect.value">
<option value="" selected></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Choose one</mat-label>
<mat-select [formControl]="selected" [errorStateMatcher]="matcher">
<mat-option>Clear</mat-option>
Expand All @@ -14,7 +14,7 @@ <h4>mat-select</h4>
</mat-form-field>

<h4>native html select</h4>
<mat-form-field class="demo-full-width">
<mat-form-field class="demo-full-width" appearance="fill">
<mat-label>Choose one</mat-label>
<select matNativeControl [formControl]="nativeSelectFormControl" [errorStateMatcher]="matcher">
<option value=""></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form>
<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite food</mat-label>
<mat-select [(ngModel)]="selectedValue" name="food">
<mat-option *ngFor="let food of foods" [value]="food.value">
Expand All @@ -10,7 +10,7 @@ <h4>mat-select</h4>
</mat-form-field>
<p> Selected food: {{selectedValue}} </p>
<h4>native html select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite car</mat-label>
<select matNativeControl [(ngModel)]="selectedCar" name="car">
<option value="" selected></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>mat select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite animal</mat-label>
<mat-select [formControl]="animalControl" required>
<mat-option>--</mat-option>
Expand All @@ -12,7 +12,7 @@ <h4>mat select</h4>
</mat-form-field>

<h4>native html select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Select your car (required)</mat-label>
<select matNativeControl required [formControl]="selectFormControl">
<option label="--select something --"></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>Basic mat-select with initial value</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite Food</mat-label>
<mat-select [(value)]="selectedFood">
<mat-option></mat-option>
Expand All @@ -9,7 +9,7 @@ <h4>Basic mat-select with initial value</h4>
<p>You selected: {{selectedFood}}</p>

<h4>Basic native select with initial value</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite Car</mat-label>
<select matNativeControl (change)="selectCar($event)">
<option value=""></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Toppings</mat-label>
<mat-select [formControl]="toppings" multiple>
<mat-option *ngFor="let topping of toppingList" [value]="topping">{{topping}}</mat-option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Select an option</mat-label>
<mat-select disableRipple>
<mat-option value="1">Option 1</mat-option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Pokemon</mat-label>
<mat-select [formControl]="pokemonControl">
<mat-option>-- None --</mat-option>
Expand All @@ -13,7 +13,7 @@ <h4>mat-select</h4>
</mat-form-field>

<h4>native html select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Cars</mat-label>
<select matNativeControl>
<optgroup label="Swedish Cars">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>Basic mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite food</mat-label>
<mat-select>
<mat-option *ngFor="let food of foods" [value]="food.value">
Expand All @@ -9,7 +9,7 @@ <h4>Basic mat-select</h4>
</mat-form-field>

<h4>Basic native select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Cars</mat-label>
<select matNativeControl required>
<option value="volvo">Volvo</option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Panel color</mat-label>
<mat-select [formControl]="panelColor"
panelClass="example-panel-{{panelColor.value}}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form [formGroup]="form">
<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite Food</mat-label>
<mat-select [formControl]="foodControl" name="food">
<mat-option>None</mat-option>
Expand All @@ -11,7 +11,7 @@ <h4>mat-select</h4>
</mat-form-field>
<p>Selected: {{foodControl.value}}</p>
<h4>Native select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Favorite Car</mat-label>
<select matNativeControl [formControl]="carControl" name="car">
<option value="">None</option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h4>mat-select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>State</mat-label>
<mat-select>
<mat-option>None</mat-option>
Expand All @@ -8,7 +8,7 @@ <h4>mat-select</h4>
</mat-form-field>

<h4>native html select</h4>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Select your car</mat-label>
<select matNativeControl id="mySelectId">
<option value="" disabled selected></option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Select an option</mat-label>
<mat-select [(value)]="selected">
<mat-option>None</mat-option>
Expand Down