Autocomplete control suggestion popup refresh
See original GitHub issueLet’s say I use the following IAutocompleteSource implementation :
public class TestClass : IAutocompleteSource
{
public ObservableCollection<Image> ItemsLst { get; set; }
public IEnumerable Search(string searchTerm)
{
searchTerm = searchTerm ?? string.Empty;
searchTerm = searchTerm.ToLower();
return ItemsLst.Where(item => item.imgName.ToLower().Contains(searchTerm));
}
}
If later on, ItemLst content changes, it will not get reflected directly in the Autocomplete suggestion popup until something new is typed (which triggers the Search() method, I imagine, and refresh the IEnumerable).
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
reload page after user click on autocomplete suggestion
I tried putting onclick()'s in the list of suggestions and have this reload the page but, for example, if user types "dubl" and...
Read more >SQL Prompt Tip: how to control when the suggestion box ...
If you want Prompt to show suggestions only 'on demand', simply uncheck the Automatically show suggestions…box while leaving Show code ...
Read more >add option to refresh auto-complete list instead of jumping
The autocomplete cannot be refreshed using standard Scintilla functions, as in update the initial list in the same popup window.
Read more >refresh - API Reference - Kendo UI AutoComplete
In this article you can see how to use the refresh method of the Kendo UI AutoComplete. ... Refresh the suggestion popup by...
Read more >IntelliSense in Visual Studio Code
Snippets in suggestions. By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the editor....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Coloris This commit introduces the
IAutocompleteSourceChangingItems
interface andAutocompleteSourceChangingItems
as an abstract implementation.Derive your autocomplete source from
AutocompleteSourceChangingItems
and call theOnAutocompleteSourceItemsChanged()
method, if the list changes. Then theAutocomplete
will trigger a new search with the recent search term to get a new list of items.I am planning to put it in a release next week.
Same situation also for me. I tried the AutocompleteSourceItemsChanged but it doesn’t work. The @infirazor 's trick works but it is a little “dirty”…