Example #1
0
        protected async void Search(object source, ElapsedEventArgs e)
        {
            isSearching          = true;
            isShowingSuggestions = false;
            await InvokeAsync(StateHasChanged);

            Suggestions          = (await SearchMethod.Invoke(searchText)).ToArray();
            isSearching          = false;
            isShowingSuggestions = true;
            await InvokeAsync(StateHasChanged);
        }
Example #2
0
        private void OnTagSearchRequested(TagBase source, string searchText)
        {
            Console.WriteLine("Search requested from " + this.tagPanel.Children.IndexOf(source));

            SearchSource = source;
            if (SearchMethod == null)
            {
                throw new InvalidOperationException("The tagbox is missing and Action<string> delegate for the SearchMethod");
            }

            SearchMethod.Invoke(searchText.Trim());
        }