Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript - TextField lose-focus event

Tags:

nativescript

In {N}, I've got a TextField and would like to call a function when the focus is lost.

I've looked at the returnPress event - but that doesn't seem to be invoked on losing focus.

I've got text="{{ property }}" set - it gets called on every key input. I just need it at the end of the input.

like image 404
dashman Avatar asked Jul 11 '26 17:07

dashman


1 Answers

A little while ago I added the blur event so you can now do blur="{{ onBlur }}" or (blur)="onBlur()" in case you're working on an Angular app.

And just so you know, there's currently a PR pending to add the focus as well.

Both of these are/will be available for TextField and TextView.

like image 144
Eddy Verbruggen Avatar answered Jul 17 '26 07:07

Eddy Verbruggen