-
Notifications
You must be signed in to change notification settings - Fork 88
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
Feature Request: Display all items if query is empty #38
Comments
Hi Taybin, you need to implement the proper Or do you mean that the component does a call to the Please let me know what exactly you mean. Thanks and regards, Guy |
I have a working itemsMethod function. According to this (https://github.com/guylabs/ion-autocomplete/blob/master/src/ion-autocomplete.js#L172), it short-circuits the searchQuery $watch handler if the query is empty. I don't see any way to get the component to call the itemsMethod handler with an empty query. |
I am also trying to accomplish this. Is it currently possible? |
I tried to change the behavior but there are some failing tests which I need to fix. I hope I can finish it till the weekend. |
@guylabs fantastic! |
Hi you two, I just added the functionality to the master. Could you please check it if it works and then write me such that I can close the issue? Thanks and regards, Guy |
Also, it would be nice if that list remained populated after clicking on an item. But maybe that's already a feature? |
I had the formatting problem too. I fixed it locally by breaking out the function $watch('searchQuery') calls into its own named function and then calling that at the bottom of the onclick handler. |
Ok I just fixed this issue too with the workaround that @taybin mentioned. Thanks for that! @JahBrewski What do you mean that this list remains populated? That the list is never cleared if the query is an empty string? You mean to remove this part here right: https://github.com/guylabs/ion-autocomplete/blob/master/src/ion-autocomplete.js#L167 ? |
Wonderful! I was just looking for this and saw you already updated the code :) |
Hi Timothy, well the problem is that Angular calls the Now for this issue: @taybin @JahBrewski I closed the issue now as @TimoSolo tested it but if there is an issue just reopen it. Thanks and regards, Guy |
Hi, I just found out a way to not call the Now the Regards, Guy |
Hmm.. that seems to break the initial list though. I've got the code to work the way I want it: when you click on the ion-search it shows the full list. also when you select something it saves the search. Created pull request: #42 |
This still isn't working for me with the updates - it only shows the list if you start typing.. what do you think of the suggested pull request? |
When the query is empty, I'd like to display the full set of items.
The text was updated successfully, but these errors were encountered: