Skip to content

Commit

Permalink
Check if TextProperty is set when attempting to use it for filter
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Dec 3, 2024
1 parent 2c24843 commit c5c33eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Radzen.Blazor/DropDownBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,9 @@ protected virtual async System.Threading.Tasks.Task HandleKeyPress(Microsoft.Asp
}
else
{
var filteredItems = Query.Where(TextProperty, args.Key, StringFilterOperator.StartsWith, FilterCaseSensitivity.CaseInsensitive)
var filteredItems = (!string.IsNullOrEmpty(TextProperty) ?
Query.Where(TextProperty, args.Key, StringFilterOperator.StartsWith, FilterCaseSensitivity.CaseInsensitive) :
Query)
.Cast<object>()
.ToList();

Expand Down

0 comments on commit c5c33eb

Please sign in to comment.