mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8429ff3150 | ||
|
|
890d352a65 | ||
|
|
acb85071f0 | ||
|
|
e41a60613c | ||
|
|
9001668e1b | ||
|
|
7b78f22fcc | ||
|
|
b614e6c1a4 | ||
|
|
187abcbcdf | ||
|
|
5a3a755f1a | ||
|
|
386e539148 | ||
|
|
d05375447b | ||
|
|
0fc5791b8e |
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user