Skip to content

Commit

Permalink
Update package 5.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed Jan 23, 2024
1 parent bbae6cb commit 05d22dd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion GridBlazor/GridBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>11.0</LangVersion>
<GenerateEmbeddedFilesManifest>True</GenerateEmbeddedFilesManifest>
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Version>5.0.7</Version>
<Version>5.0.8</Version>
<Title>GridBlazor</Title>
<Description>Grid components for Blazor</Description>
<Summary>Grid components for Blazor</Summary>
Expand Down
2 changes: 1 addition & 1 deletion GridCore/GridCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Product>GridCore</Product>
<PackageId>GridCore</PackageId>
<Version>7.0.4</Version>
<Version>7.0.5</Version>
<Title>GridCore</Title>
<Description>Grid core component</Description>
<Summary>Grid core component</Summary>
Expand Down
2 changes: 1 addition & 1 deletion GridMvc/GridMvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Product>GridMvc</Product>
<PackageId>GridMvcCore</PackageId>
<Version>7.0.4</Version>
<Version>7.0.5</Version>
<Title>GridMvc</Title>
<Description>ASP.NET MVC Grid component</Description>
<Summary>ASP.NET MVC Grid component</Summary>
Expand Down
7 changes: 4 additions & 3 deletions GridShared/Filtering/Types/FilterTypeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ protected Expression GetFilterExpression<T, S>(Expression leftExpr, string value
filterType = GetValidType(filterType);

object typedValue = GetTypedValue(value);
if (typedValue == null)
if (typedValue == null && filterType != GridFilterType.IsDuplicated
&& filterType != GridFilterType.IsNotDuplicated)
return null; //incorrent filter value;

Type targetType = TargetType;
Expand Down Expand Up @@ -85,13 +86,13 @@ protected Expression GetFilterExpression<T, S>(Expression leftExpr, string value
MethodInfo methodInfo = typeof(Queryable).GetMethods()
.Single(r => r.Name == "Contains" && r.GetParameters().Length == 2)
.MakeGenericMethod(new Type[] { typeof(S) });
return Expression.Call(groupBy, methodInfo, leftExpr);
return Expression.Call(methodInfo, groupBy, leftExpr);
case GridFilterType.IsNotDuplicated:
groupBy = GetGroupBy<T, S>(source, leftExpr);
methodInfo = typeof(Queryable).GetMethods()
.Single(r => r.Name == "Contains" && r.GetParameters().Length == 2)
.MakeGenericMethod(new Type[] { typeof(S) });
var expresion = Expression.Call(groupBy, methodInfo, leftExpr);
var expresion = Expression.Call(methodInfo, groupBy, leftExpr);
return Expression.Not(expresion);
default:
throw new ArgumentOutOfRangeException();
Expand Down
7 changes: 4 additions & 3 deletions GridShared/Filtering/Types/GuidFilterType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public override Expression GetFilterExpression<T>(Expression leftExpr, string va
filterType = GetValidType(filterType);

object typedValue = GetTypedValue(value);
if (typedValue == null)
if (typedValue == null && filterType != GridFilterType.IsDuplicated
&& filterType != GridFilterType.IsNotDuplicated)
return null; //incorrent filter value;

Expression valueExpr = Expression.Constant(typedValue);
Expand Down Expand Up @@ -76,14 +77,14 @@ public override Expression GetFilterExpression<T>(Expression leftExpr, string va
MethodInfo methodInfo = typeof(Queryable).GetMethods()
.Single(r => r.Name == "Contains" && r.GetParameters().Length == 2)
.MakeGenericMethod(new Type[] { typeof(Guid) });
binaryExpression = Expression.Call(groupBy, methodInfo, toStringLeftExpr);
binaryExpression = Expression.Call(methodInfo, groupBy, toStringLeftExpr);
break;
case GridFilterType.IsNotDuplicated:
groupBy = GetGroupBy<T, Guid>(source, leftExpr);
methodInfo = typeof(Queryable).GetMethods()
.Single(r => r.Name == "Contains" && r.GetParameters().Length == 2)
.MakeGenericMethod(new Type[] { typeof(Guid) });
var expresion = Expression.Call(groupBy, methodInfo, toStringLeftExpr);
var expresion = Expression.Call(methodInfo, groupBy, toStringLeftExpr);
binaryExpression = Expression.Not(expresion);
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion GridShared/GridShared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>11.0</LangVersion>
<Version>7.0.3</Version>
<Version>7.0.4</Version>
<Title>GridShared</Title>
<Description>Support library for GridBlazor and GridMvcCore component libraries</Description>
<Summary>Support library for GridBlazor and GridMvcCore component libraries</Summary>
Expand Down

0 comments on commit 05d22dd

Please sign in to comment.