Exemplo n.º 1
0
 private async Task SearchAsync()
 {
     Loading = true;
     if (OnSearch.HasDelegate)
     {
         await OnSearch.InvokeAsync(CurrentValue);
     }
     Loading = false;
 }
Exemplo n.º 2
0
 private async void HandleSearch(MouseEventArgs args)
 {
     _isSearching = true;
     if (OnSearch.HasDelegate)
     {
         await OnSearch.InvokeAsync(EventArgs.Empty);
     }
     _isSearching = false;
     StateHasChanged();
 }
Exemplo 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();
        }
Exemplo 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()));
            }
        }
Exemplo n.º 5
0
        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()));
            }
        }
Exemplo n.º 6
0
 private void InvokeOnSearch()
 {
     OnSearch.InvokeAsync(Value);
 }
Exemplo n.º 7
0
 public async Task OnClickGroup(MouseEventArgs e, string group)
 {
     await OnSearch.InvokeAsync(group);
 }
Exemplo n.º 8
0
 public async Task OnSearchBtnClick(MouseEventArgs e)
 {
     await OnSearch.InvokeAsync(SearchInput);
 }