mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-13 21:30:44 +00:00
Fixed Dropdown Filter Not Working When Binding List to Struct Class
Fix #1973
This commit is contained in:
@@ -274,6 +274,11 @@ namespace Radzen
|
||||
member = Expression.PropertyOrField(expression, currentPart);
|
||||
}
|
||||
|
||||
if (expression.Type.IsValueType && Nullable.GetUnderlyingType(expression.Type) == null)
|
||||
{
|
||||
expression = Expression.Convert(expression, typeof(object));
|
||||
}
|
||||
|
||||
return parts.Length > 1 ? GetNestedPropertyExpression(member, parts[1], type) :
|
||||
(Nullable.GetUnderlyingType(member.Type) != null || member.Type == typeof(string)) ?
|
||||
Expression.Condition(Expression.Equal(expression, Expression.Constant(null)), Expression.Constant(null, member.Type), member) :
|
||||
|
||||
Reference in New Issue
Block a user