Compare commits

...

12 Commits

Author SHA1 Message Date
Vladimir Enchev
8429ff3150 Radzen.Blazor updated 2021-07-13 08:51:14 +03:00
Vladimir Enchev
890d352a65 Version updated 2021-07-13 08:48:25 +03:00
Vladimir Enchev
acb85071f0 Fixed context menu throws exception
Fix #170
2021-07-13 08:32:31 +03:00
Vladimir Enchev
e41a60613c Fixed DataGrid boolean column second filter 2021-07-12 18:55:41 +03:00
Vladimir Enchev
9001668e1b DataGrid null reference exception fixed when accessing columns value fromsub properties 2021-07-12 09:42:00 +03:00
Vladimir Enchev
7b78f22fcc Radzen.Blazor updated 2021-07-08 06:56:10 +03:00
Vladimir Enchev
b614e6c1a4 Version updated 2021-07-08 06:53:58 +03:00
Vladimir Enchev
187abcbcdf Popup close on scroll reworked 2021-07-07 20:16:05 +03:00
Vladimir Enchev
5a3a755f1a Should not close popups on mobile devices scroll
DropDown popup closes when trying to type something for filter
2021-07-07 15:23:25 +03:00
Vladimir Enchev
386e539148 Radzen.Blazor updated 2021-07-05 16:49:59 +03:00
Vladimir Enchev
d05375447b Version updated 2021-07-05 16:46:59 +03:00
Vladimir Enchev
0fc5791b8e DataGrid filtering by numeric not working in simple mode
Fix #165
2021-07-05 16:46:28 +03:00
5 changed files with 33 additions and 12 deletions

View File

@@ -8,7 +8,7 @@
<IsPackable>true</IsPackable>
<PackageId>Radzen.Blazor</PackageId>
<Product>Radzen.Blazor</Product>
<Version>3.6.5</Version>
<Version>3.6.8</Version>
<Copyright>Radzen Ltd.</Copyright>
<Authors>Radzen Ltd.</Authors>
<Description>Native Blazor UI components by Radzen Ltd.</Description>

View File

@@ -131,7 +131,7 @@
}
else if (column.FilterPropertyType == typeof(bool) || column.FilterPropertyType == typeof(bool?))
{
<RadzenCheckBox TriState="true" TValue="@object" Value="@column.GetSecondFilterValue()" Change="@((args) => OnFilter(new ChangeEventArgs() { Value = args }, column, false))" />
<RadzenCheckBox TriState="true" TValue="@object" Value="@column.GetSecondFilterValue()" Change="@((args) => OnFilter(new ChangeEventArgs() { Value = args }, column, false, false))" />
}
else
{
@@ -548,10 +548,13 @@
builder.AddAttribute(3, "Change", eventCallbackGenericCreate.Invoke(this,
new object[] { this, eventCallbackGenericAction.Invoke(this, new object[] { action }) }));
builder.AddAttribute(4, "oninput", EventCallback.Factory.Create<ChangeEventArgs>(this, args => {
var value = $"{args.Value}";
column.SetFilterValue(!string.IsNullOrWhiteSpace(value) ? Convert.ChangeType(value, Nullable.GetUnderlyingType(type)) : null, isFirst);
} ));
if(FilterMode == FilterMode.Advanced)
{
builder.AddAttribute(4, "oninput", EventCallback.Factory.Create<ChangeEventArgs>(this, args => {
var value = $"{args.Value}";
column.SetFilterValue(!string.IsNullOrWhiteSpace(value) ? Convert.ChangeType(value, Nullable.GetUnderlyingType(type)) : null, isFirst);
} ));
}
builder.CloseComponent();
});

View File

@@ -109,7 +109,7 @@
public object GetValue(TItem item)
{
var value = propertyValueGetter != null ? propertyValueGetter(item) : !string.IsNullOrEmpty(Property) ? PropertyAccess.GetValue(item, Property) : "";
var value = propertyValueGetter != null && !string.IsNullOrEmpty(Property) && !Property.Contains('.') ? propertyValueGetter(item) : !string.IsNullOrEmpty(Property) ? PropertyAccess.GetValue(item, Property) : "";
return !string.IsNullOrEmpty(FormatString) ? string.Format(FormatString, value) : value;
}

View File

@@ -718,7 +718,7 @@ window.Radzen = {
Radzen[id] = function (e) {
if (!e.defaultPrevented) {
if (parent) {
if ((e.type == 'click' && !parent.contains(e.target) && !popup.contains(e.target)) || (e.type == 'scroll' && e.target == e.currentTarget)) {
if (e.type == 'click' && !parent.contains(e.target) && !popup.contains(e.target)) {
Radzen.closePopup(id, instance, callback);
}
} else {
@@ -729,12 +729,31 @@ window.Radzen = {
}
};
if (!Radzen.closePopupsOnScroll) {
Radzen.closePopupsOnScroll = function (e) {
for (var i = 0; i < Radzen.popups.length; i++) {
var p = Radzen.popups[i];
Radzen.closePopup(p.id, p.instance, p.callback);
}
Radzen.popups = [];
};
Radzen.popups = [];
}
Radzen.popups.push({id, instance, callback});
document.body.appendChild(popup);
document.removeEventListener('click', Radzen[id]);
document.addEventListener('click', Radzen[id]);
document.removeEventListener('scroll', Radzen[id]);
document.addEventListener('scroll', Radzen[id], true);
var p = parent;
while (p && p != document.body) {
if (p.scrollWidth > p.clientWidth || p.scrollHeight > p.clientHeight) {
p.removeEventListener('scroll', Radzen.closePopupsOnScroll);
p.addEventListener('scroll', Radzen.closePopupsOnScroll);
}
p = p.parentElement;
}
if (!parent) {
document.removeEventListener('contextmenu', Radzen[id]);
@@ -750,7 +769,6 @@ window.Radzen = {
popup.style.display = 'none';
}
document.removeEventListener('click', Radzen[id]);
document.removeEventListener('scroll', Radzen[id]);
Radzen[id] = null;
if (instance) {

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Radzen.Blazor" Version="3.6.5" Condition="'$(Configuration)' == 'Release'"/>
<PackageReference Include="Radzen.Blazor" Version="3.6.8" Condition="'$(Configuration)' == 'Release'"/>
<ProjectReference Include="..\Radzen.Blazor\Radzen.Blazor.csproj" Condition="'$(Configuration)' != 'Release'" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0" />