mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ac46f239e | ||
|
|
1e106f7ada | ||
|
|
09738b2dd7 | ||
|
|
dc67a0b0fc | ||
|
|
1258bbc770 | ||
|
|
5960318a60 | ||
|
|
d4faf758f4 | ||
|
|
f88216b9a0 | ||
|
|
e21d648588 | ||
|
|
dbcbdc9bbc | ||
|
|
c5d16e8381 | ||
|
|
ac1aa6f3b1 | ||
|
|
866c222c74 | ||
|
|
06843477cb | ||
|
|
9a7a6fc6ab | ||
|
|
4986da415f |
@@ -758,6 +758,11 @@ namespace Radzen
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if expandable; otherwise, <c>false</c>.</value>
|
||||
public bool Expandable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating row index.
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -675,8 +675,10 @@ namespace Radzen
|
||||
|
||||
if (selectedIndex >= 0 && selectedIndex <= items.Count() - 1)
|
||||
{
|
||||
await JSRuntime.InvokeAsync<string>("Radzen.setInputValue", search, $"{searchText}".Trim());
|
||||
var itemToSelect = items.ElementAtOrDefault(selectedIndex);
|
||||
|
||||
await JSRuntime.InvokeAsync<string>("Radzen.setInputValue", search, $"{searchText}".Trim());
|
||||
|
||||
if (itemToSelect != null)
|
||||
{
|
||||
await OnSelectItem(itemToSelect, true);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>Radzen.Blazor</PackageId>
|
||||
<Product>Radzen.Blazor</Product>
|
||||
<Version>5.2.10</Version>
|
||||
<Version>5.2.12</Version>
|
||||
<Copyright>Radzen Ltd.</Copyright>
|
||||
<Authors>Radzen Ltd.</Authors>
|
||||
<Description>Radzen Blazor is a set of 90+ free native Blazor UI controls packed with DataGrid, Scheduler, Charts and robust theming including Material design and Fluent UI.</Description>
|
||||
|
||||
@@ -48,11 +48,13 @@ namespace Radzen.Blazor
|
||||
{
|
||||
var validationResults = new List<ValidationResult>();
|
||||
|
||||
var getter = PropertyAccess.Getter<object>(EditContext.Model, component.FieldIdentifier.FieldName);
|
||||
var model = component.FieldIdentifier.Model;
|
||||
|
||||
var value = getter(EditContext.Model);
|
||||
var getter = PropertyAccess.Getter<object>(model, component.FieldIdentifier.FieldName);
|
||||
|
||||
var validationContext = new ValidationContext(EditContext.Model)
|
||||
var value = getter(model);
|
||||
|
||||
var validationContext = new ValidationContext(model)
|
||||
{
|
||||
MemberName = component.FieldIdentifier.FieldName
|
||||
};
|
||||
|
||||
@@ -141,12 +141,12 @@ namespace Radzen.Blazor
|
||||
if (Groups.Any())
|
||||
{
|
||||
query = view.AsQueryable().OrderBy(DynamicLinqCustomTypeProvider.ParsingConfig, Groups.Any() ? string.Join(',', Groups.Select(g => $"{(typeof(TItem) == typeof(object) ? g.Property : "np(" + g.Property + ")")}")) : "it");
|
||||
_groupedPagedView = query.GroupByMany(DynamicLinqCustomTypeProvider.ParsingConfig, Groups.Any() ? Groups.Select(g => $"{(typeof(TItem) == typeof(object) ? g.Property : "np(" + g.Property + ")")}").ToArray() : new string[] { "it" }).ToList();
|
||||
_groupedPagedView = await Task.FromResult(query.GroupByMany(DynamicLinqCustomTypeProvider.ParsingConfig, Groups.Any() ? Groups.Select(g => $"{(typeof(TItem) == typeof(object) ? g.Property : "np(" + g.Property + ")")}").ToArray() : new string[] { "it" }).ToList());
|
||||
|
||||
totalItemsCount = await Task.FromResult(_groupedPagedView.Count());
|
||||
}
|
||||
|
||||
_view = Enumerable.Empty<TItem>().AsQueryable();
|
||||
_view = view;
|
||||
|
||||
return new Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderResult<GroupResult>(_groupedPagedView.Any() ? _groupedPagedView.Skip(request.StartIndex).Take(top) : _groupedPagedView, totalItemsCount);
|
||||
}
|
||||
@@ -2278,9 +2278,9 @@ namespace Radzen.Blazor
|
||||
return (RowSelect.HasDelegate || ValueChanged.HasDelegate || SelectionMode == DataGridSelectionMode.Multiple) && selectedItems.Keys.Any(i => ItemEquals(i, item)) ? $"rz-state-highlight rz-data-row {isInEditMode} " : $"rz-data-row {isInEditMode} ";
|
||||
}
|
||||
|
||||
internal Tuple<Radzen.RowRenderEventArgs<TItem>, IReadOnlyDictionary<string, object>> RowAttributes(TItem item)
|
||||
internal Tuple<Radzen.RowRenderEventArgs<TItem>, IReadOnlyDictionary<string, object>> RowAttributes(TItem item, int index)
|
||||
{
|
||||
var args = new Radzen.RowRenderEventArgs<TItem>() { Data = item, Expandable = Template != null || LoadChildData.HasDelegate };
|
||||
var args = new Radzen.RowRenderEventArgs<TItem>() { Data = item, Index = index, Expandable = Template != null || LoadChildData.HasDelegate };
|
||||
|
||||
if (RowRender != null)
|
||||
{
|
||||
@@ -3104,7 +3104,7 @@ namespace Radzen.Blazor
|
||||
var functionName = $"Radzen['{getColumnUniqueId(indexOfColumnToReoder.Value)}end']";
|
||||
await JSRuntime.InvokeVoidAsync("eval", $"{functionName} && {functionName}()");
|
||||
|
||||
var column = allColumns.ElementAtOrDefault(indexOfColumnToReoder.Value);
|
||||
var column = allColumns.Where(c => c.Visible).ToList().ElementAtOrDefault(indexOfColumnToReoder.Value);
|
||||
|
||||
if (column != null && column.Groupable && !string.IsNullOrEmpty(column.GetGroupProperty()))
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@implements IRadzenForm
|
||||
<CascadingValue Value=@EditContext>
|
||||
<CascadingValue Value=this>
|
||||
@{var rowArgs = Grid?.RowAttributes(Item); }
|
||||
@{var rowArgs = Grid?.RowAttributes(Item, Index); }
|
||||
@{var firstLevel = Grid.AllowCompositeDataCells ? 0 : Grid.deepestChildColumnLevel; }
|
||||
@for(var i = firstLevel; i < Grid.deepestChildColumnLevel + 1; i++)
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
{
|
||||
<input @ref="@input" @attributes="InputAttributes" disabled="@Disabled" readonly="@IsReadonly" value="@FormattedValue" tabindex="@(Disabled ? "-1" : $"{TabIndex}")"
|
||||
@onchange="@ParseDate" autocomplete="off" type="text" name="@Name" @onkeydown="@(args => OnKeyPress(args))" @onkeydown:preventDefault=preventKeyPress @onkeydown:stopPropagation
|
||||
class="rz-inputtext @InputClass @(IsReadonly ? "rz-readonly" : "") @(!ShowButton ? "rz-input-trigger" : "")" id="@Name" placeholder="@Placeholder" />
|
||||
class="rz-inputtext @InputClass @(ReadOnly ? "rz-readonly" : "") @(!ShowButton ? "rz-input-trigger" : "")" id="@Name" placeholder="@Placeholder" />
|
||||
@if (ShowButton)
|
||||
{
|
||||
<button aria-label="@ToggleAriaLabel" @onmousedown=@OnToggle class="@($"rz-datepicker-trigger rz-button rz-button-icon-only{(Disabled ? " rz-state-disabled" : "")}")" tabindex="-1" type="button">
|
||||
<button aria-label="@ToggleAriaLabel" @onmousedown=@OnToggle class="@($"rz-datepicker-trigger rz-button rz-button-icon-only{(Disabled ? " rz-state-disabled" : "")} {ButtonClass}")" tabindex="-1" type="button">
|
||||
<span aria-hidden="true" class="@ButtonClasses"></span><span class="rz-button-text"></span>
|
||||
</button>
|
||||
}
|
||||
|
||||
@@ -316,6 +316,12 @@ namespace Radzen.Blazor
|
||||
/// <value>The input CSS class.</value>
|
||||
[Parameter]
|
||||
public string InputClass { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the button CSS class.
|
||||
/// </summary>
|
||||
/// <value>The button CSS class.</value>
|
||||
[Parameter]
|
||||
public string ButtonClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Minimum Selectable Date.
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
namespace Radzen.Blazor
|
||||
{
|
||||
/// <summary>
|
||||
/// RadzenCard component.
|
||||
/// RadzenStack component.
|
||||
/// </summary>
|
||||
public partial class RadzenStack : RadzenFlexComponent
|
||||
{
|
||||
|
||||
@@ -991,6 +991,7 @@ window.Radzen = {
|
||||
}
|
||||
},
|
||||
closeTooltip(id) {
|
||||
Radzen.activeElement = null;
|
||||
Radzen.closePopup(id);
|
||||
|
||||
if (Radzen[id + 'delay']) {
|
||||
@@ -1022,16 +1023,17 @@ window.Radzen = {
|
||||
}
|
||||
};
|
||||
|
||||
var input = el.querySelector('.rz-inputtext');
|
||||
var button = el.querySelector('.rz-datepicker-trigger');
|
||||
if (button) {
|
||||
button.onclick = function (e) {
|
||||
handler(e, !e.currentTarget.classList.contains('rz-state-disabled'));
|
||||
handler(e, !e.currentTarget.classList.contains('rz-state-disabled') && (input ? !input.classList.contains('rz-readonly') : true));
|
||||
};
|
||||
}
|
||||
var input = el.querySelector('.rz-inputtext');
|
||||
|
||||
if (input) {
|
||||
input.onclick = function (e) {
|
||||
handler(e, e.currentTarget.classList.contains('rz-readonly') || e.currentTarget.classList.contains('rz-input-trigger') );
|
||||
handler(e, e.currentTarget.classList.contains('rz-input-trigger') && !e.currentTarget.classList.contains('rz-readonly'));
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script src="_framework/blazor.web.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
|
||||
<script async src="js/highlight.pack.js"></script>
|
||||
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
|
||||
<script defer data-domain="blazor.radzen.com" src="https://analytics.radzen.com/js/plausible.js"></script>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script src="_framework/blazor.web.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
|
||||
<script async src="js/highlight.pack.js"></script>
|
||||
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
|
||||
<script defer data-domain="blazor.radzen.com" src="https://analytics.radzen.com/js/plausible.js"></script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@
|
||||
Data="@(orderDetails.Where(o => o.OrderID == OrderID))" ColumnWidth="200px" Density="Density.Compact" AllowAlternatingRows="false">
|
||||
<Columns>
|
||||
<RadzenDataGridColumn Property="@nameof(OrderDetail.Quantity)" Title="Quantity" />
|
||||
<RadzenDataGridColumn Property="Order.OrderDate" Title="Order Date" />
|
||||
<RadzenDataGridColumn Property="Order.OrderDate" Title="Order Date" FormatString="{0:d}" />
|
||||
<RadzenDataGridColumn Property="@nameof(OrderDetail.Discount)" Title="Discount" FormatString="{0:P}" />
|
||||
</Columns>
|
||||
</RadzenDataGrid>
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace RadzenBlazorDemos
|
||||
|
||||
var csharpDocument = codeDocument.GetCSharpDocument();
|
||||
|
||||
var syntaxTree = CSharpSyntaxTree.ParseText(csharpDocument.GeneratedCode, CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp10));
|
||||
var syntaxTree = CSharpSyntaxTree.ParseText(csharpDocument.GeneratedCode.Replace("<Radzen.Group>", "<global::Radzen.Group>"), CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp10));
|
||||
|
||||
compilation = compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(syntaxTree);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user