Skip to content
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

fix(input): ensure that property bindings work #2431

Merged
merged 3 commits into from Jan 4, 2017

Conversation

devversion
Copy link
Member

  • Developers are currently not able to use property bindings for required, disabled, type and placeholder.
  • This commit ensures that the Angular input setters are in sync with the native input element.
  • Adds test to ensure that the property bindings work for the native input element (and not for the component instance as before)

cc. @mmalerba

Fixes #2428

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 27, 2016
@arciisine
Copy link

Please also look at #2363 as I think it's the same issue, but targeting the value property.

@devversion
Copy link
Member Author

devversion commented Dec 27, 2016

@arciisine I looked into the [value] issue, but decided to address this in another PR because it does not relate to the getters and setters and requires further investigations.

@arciisine
Copy link

Thanks @devversion. No worries, just wanted to make sure it wasn't overlooked if it fell into the same bucket.

/** Determines if the component host is a textarea. If not recognizable it returns false. */
private _isTextarea() {
let nativeElement = this._elementRef.nativeElement;
return nativeElement ? nativeElement.nodeName === 'textarea' : 'input';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/'input'/false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! - and lol 😄 The new way of reviewing

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 4, 2017
@kara kara added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Jan 4, 2017
@kara
Copy link
Contributor

kara commented Jan 4, 2017

@devversion Can you rebase real quick?

* Developers are currently not able to use property bindings for `required`, `disabled`, `type` and `placeholder`.
* This commit ensures that the Angular input setters are in sync with the native input element.
* Adds test to ensure that the property bindings work for the native input element (and not for the component instance as before)

Fixes angular#2428
@devversion
Copy link
Member Author

@kara Done. Waiting for one saucelabs task to finish.

@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jan 4, 2017
@kara kara merged commit b4b4224 into angular:master Jan 4, 2017
@devversion devversion deleted the fix/input-property-bindings branch January 4, 2017 20:03
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hello all! have problem with type in md-input (beta.1)
5 participants