Esempio n. 1
0
 private async Task SearchAsync()
 {
     Loading = true;
     if (OnSearch.HasDelegate)
     {
         await OnSearch.InvokeAsync(CurrentValue);
     }
     Loading = false;
 }
Esempio n. 2
0
 private async void HandleSearch(MouseEventArgs args)
 {
     _isSearching = true;
     if (OnSearch.HasDelegate)
     {
         await OnSearch.InvokeAsync(EventArgs.Empty);
     }
     _isSearching = false;
     StateHasChanged();
 }
Esempio n. 3
0
        private async void HandleSearch(MouseEventArgs args)
        {
            _isSearching = true;
            StateHasChanged();
            if (OnSearch.HasDelegate)
            {
                await OnSearch.InvokeAsync(EventArgs.Empty);
            }
            await Task.Delay(TimeSpan.FromSeconds(10));

            _isSearching = false;
            StateHasChanged();
        }
Esempio n. 4
0
        private async Task HandleSearch(ChangeEventArgs e, string direction)
        {
            if (direction == TransferDirection.Left)
            {
                _leftDataSource = DataSource.Where(a => !TargetKeys.Contains(a.Key) && a.Title.Contains(e.Value.ToString())).ToList();
            }
            else
            {
                _rightDataSource = DataSource.Where(a => TargetKeys.Contains(a.Key) && a.Title.Contains(e.Value.ToString())).ToList();
            }

            if (OnSearch.HasDelegate)
            {
                await OnSearch.InvokeAsync(new TransferSearchArgs(direction, e.Value.ToString()));
            }
        }
        private async Task HandleSearch(ChangeEventArgs e, string direction, bool mathTileCount = true)
        {
            if (direction == TransferDirection.Left)
            {
                _leftFilterValue = e.Value.ToString();
                _leftDataSource  = DataSource.Where(a => !_targetKeys.Contains(a.Key) && a.Title.Contains(_leftFilterValue, StringComparison.InvariantCultureIgnoreCase)).ToList();
            }
            else
            {
                _rightFilterValue = e.Value.ToString();
                _rightDataSource  = DataSource.Where(a => _targetKeys.Contains(a.Key) && a.Title.Contains(_rightFilterValue, StringComparison.InvariantCultureIgnoreCase)).ToList();
            }

            if (mathTileCount)
            {
                MathTitleCount();
            }

            if (OnSearch.HasDelegate)
            {
                await OnSearch.InvokeAsync(new TransferSearchArgs(direction, e.Value.ToString()));
            }
        }
Esempio n. 6
0
 private void InvokeOnSearch()
 {
     OnSearch.InvokeAsync(Value);
 }
Esempio n. 7
0
 public async Task OnClickGroup(MouseEventArgs e, string group)
 {
     await OnSearch.InvokeAsync(group);
 }
Esempio n. 8
0
 public async Task OnSearchBtnClick(MouseEventArgs e)
 {
     await OnSearch.InvokeAsync(SearchInput);
 }