Nativescript: Add support for both 'focusLost' and 'textChanged' events for Text input (or) add a focusLost/blur Event

Created on 28 Mar 2017  路  4Comments  路  Source: NativeScript/NativeScript

Hi,

I encountered a case where I'd like to observe both focusLost and textChanged events on a TextField. There seems to be no way to currently observe a "blur" event when textChanged is required as well.

So can this enum please be extended with an all?

I'm up for a PR if you think this is a good idea.

Thanks,
Eddy

done feature

Most helpful comment

While we're on the subject.. it may be even more useful to have a dedicated focusLost event that binds to a function. So for Angular: (focusLost)="myBlurHandler($event)".

All 4 comments

While we're on the subject.. it may be even more useful to have a dedicated focusLost event that binds to a function. So for Angular: (focusLost)="myBlurHandler($event)".

About the UpdateTextTrigger enum - generally textChange is more frequent than focusLost and it doesn't make sense to trigger text change twice with the same text - after the last change and on lost focus.
I think a dedicated focusLost or even blurwould be more useful.
PR would be great - thanks @EddyVerbruggen

@vakrilov Yeah that makes more sense to me as well. Could be a bit harder to pull off but I'll give it a shot 馃憤

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yclau picture yclau  路  3Comments

rogangriffin picture rogangriffin  路  3Comments

Leo-lay picture Leo-lay  路  3Comments

guillaume-roy picture guillaume-roy  路  3Comments

kn9ts picture kn9ts  路  3Comments