Skip to content

fix(input): allow color inputs in mat-form-field #8748

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
Dec 13, 2017
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
11 changes: 9 additions & 2 deletions src/demo-app/input/input-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<table style="width: 100%" cellspacing="0"><tr>
<td>
<mat-form-field style="width: 100%" floatPlaceholder="never">
<mat-form-field style="width: 100%" floatLabel="never">
<input matInput placeholder="First name">
</mat-form-field>
</td>
Expand Down Expand Up @@ -304,11 +304,18 @@ <h4>Textarea</h4>
</p>

<p>
<mat-form-field [floatPlaceholder]="floatingLabel">
<mat-form-field [floatLabel]="floatingLabel">
<input matInput placeholder="Placeholder">
</mat-form-field>
</p>

<p>
<mat-form-field [floatLabel]="floatingLabel">
<mat-label>What is your favorite color?</mat-label>
<input matInput type="color" value="#00ff00">
</mat-form-field>
</p>

<p>
<mat-form-field>
<input matInput placeholder="Prefixed" value="example">
Expand Down
1 change: 0 additions & 1 deletion src/lib/input/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';
const MAT_INPUT_INVALID_TYPES = [
'button',
'checkbox',
'color',
'file',
'hidden',
'image',
Expand Down
2 changes: 1 addition & 1 deletion src/universal-app/kitchen-sink/kitchen-sink.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h2>Icon</h2>

<h2>Input</h2>

<mat-form-field floatPlaceholder="never">
<mat-form-field floatLabel="never">
<input matInput placeholder="name">
</mat-form-field>

Expand Down