-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Searchbar cancel event is execute input function #6382
Comments
Hello @MatanYed ! Thanks for opening an issue with us! I cant seem to see your example, it looks like the url is incorrect, would you mind reposting it? |
@jgw96 oh, oops, i added it now. |
@MatanYed Thanks, i can see the example now. Would you be able to provide a minimal code example that i can use to reproduce this? Thanks |
@jgw96 Sure. HTML:
Typescript:
|
So this is because the input is cleared when clicking on the cancel button (and the input event gets emitted on the clear function). We could add a check that the input has a value prior to clearing it and only emit the https://github.com/driftyco/ionic/blob/2.0/ionic/components/searchbar/searchbar.ts#L313 |
Thanks for the issue. This will be fixed in the |
Type: bug
Ionic Version: 2.x
Platform: all
When there is no text in searchbar and you click on cancel button, the searchbar is execute the (input) function
(input)="loadItems($event)"
.It's should execute the function only if there is text in search and than clicking cancel.
Look here my example here:
https://drive.google.com/file/d/0B_2AM8ZhXhE9U3RGdEJtRF82Ujg/view
I wish you understood the problem...
The text was updated successfully, but these errors were encountered: