Filter after finished typing

Hi all,
I want to the IF clause to execute only after I have finished typing in the search box.
If the array this.list.length == 0, I will show Alert to ask for creating a new account.
Pls help me!!
Thanks so much.