-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(input): rename input-container
to form-field
...
#6331
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
Changes from 5 commits
863bd28
b607297
bb2dca5
dfddd97
b16ef28
9baaaeb
a1d5ce9
5a957bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.mat-input-container { | ||
.mat-form-field { | ||
width: 250px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
margin: 24px; | ||
} | ||
|
||
.mat-input-container { | ||
.mat-form-field { | ||
margin-top: 16px; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ tabs-demo .mat-card { | |
margin-top: 8px; | ||
} | ||
|
||
.mat-input-container { | ||
.mat-form-field { | ||
width: 100px; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,8 @@ import {Observable} from 'rxjs/Observable'; | |
import {MdOptionSelectionChange, MdOption} from '../core/option/option'; | ||
import {ENTER, UP_ARROW, DOWN_ARROW, ESCAPE} from '../core/keyboard/keycodes'; | ||
import {Directionality} from '../core/bidi/index'; | ||
import {MdInputContainer} from '../input/input-container'; | ||
import {MdFormField} from '../form-field/index'; | ||
import {MdInput} from '../input/input'; | ||
import {Subscription} from 'rxjs/Subscription'; | ||
import {merge} from 'rxjs/observable/merge'; | ||
import {fromEvent} from 'rxjs/observable/fromEvent'; | ||
|
@@ -153,7 +154,7 @@ export class MdAutocompleteTrigger implements ControlValueAccessor, OnDestroy { | |
private _changeDetectorRef: ChangeDetectorRef, | ||
@Inject(MD_AUTOCOMPLETE_SCROLL_STRATEGY) private _scrollStrategy, | ||
@Optional() private _dir: Directionality, | ||
@Optional() @Host() private _inputContainer: MdInputContainer, | ||
@Optional() @Host() private _inputContainer: MdFormField, | ||
@Optional() @Inject(DOCUMENT) private _document: any) {} | ||
|
||
ngOnDestroy() { | ||
|
@@ -410,8 +411,9 @@ export class MdAutocompleteTrigger implements ControlValueAccessor, OnDestroy { | |
|
||
// If it's used in a Material container, we should set it through | ||
// the property so it can go through the change detection. | ||
if (this._inputContainer) { | ||
this._inputContainer._mdInputChild.value = inputValue; | ||
if (this._inputContainer && | ||
this._inputContainer._control instanceof MdInput) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this need to check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm now that I think about it, its probably better to make the |
||
this._inputContainer._control.value = inputValue; | ||
} else { | ||
this._element.nativeElement.value = inputValue; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename
_inputContainer
to_formField
?