Skip to content

fix(forms): Changed the TextValueAccessor to apply ng-touched on blur#1230

Merged
manoldonev merged 3 commits intoNativeScript:masterfrom
vultix:ng-touched-fix
Jul 24, 2018
Merged

fix(forms): Changed the TextValueAccessor to apply ng-touched on blur#1230
manoldonev merged 3 commits intoNativeScript:masterfrom
vultix:ng-touched-fix

Conversation

@vultix
Copy link
Copy Markdown
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
Copy Markdown

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

2 similar comments
@ns-bot
Copy link
Copy Markdown

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Mar 10, 2018

Can one of the admins verify this patch?

@gms1
Copy link
Copy Markdown

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
Copy Markdown
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.

5 participants