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(forms): Changed the TextValueAccessor to apply ng-touched on blur #1230

Merged
merged 3 commits into from
Jul 24, 2018

Conversation

vultix
Copy link
Contributor

@vultix vultix commented Mar 10, 2018

PR Checklist

What is the current behavior?

The moment a TextField or TextView is touched the onTouched() function is called on the valueAccessor. This changes the ng-untouched class to ng-touched. See #1063 and Playground Demo

What is the new behavior?

The TextValueAccessor now waits for the blur event before marking the field as touched.

This is the angular-core behavior as can be seen here.

Fixes #1063, #804.

@ns-bot
Copy link

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

2 similar comments
@ns-bot
Copy link

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

@gms1
Copy link

gms1 commented Jun 12, 2018

this PR would fix "TextField having wrong value if updateOn: 'blur'" 👍

https://github.com/angular/angular/blob/master/packages/forms/src/directives/control_value_accessor.ts
On blur (or equivalent), your class should call the registered function to allow
the forms API to update itself

@ghost ghost assigned manoldonev Jul 23, 2018
@ghost ghost added in progress and removed ♥ community PR labels Jul 23, 2018
@ghost ghost assigned SvetoslavTsenov Jul 23, 2018
@manoldonev
Copy link
Contributor

test

@manoldonev manoldonev merged commit 06ca3a0 into NativeScript:master Jul 24, 2018
@ghost ghost removed the in progress label Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants