Add support for adding 'loose' items to transactions
All checks were successful
Docker Image CI / build (push) Successful in 3m45s

This commit is contained in:
2024-10-12 02:36:38 +01:00
parent dfcab40d70
commit 47d13ba922
13 changed files with 178 additions and 46 deletions

View File

@ -20,6 +20,9 @@ public class PropertyTableColumn<TItem, TProp> : TableColumn<TItem>
[Parameter]
public string? Format { get; set; }
[Parameter]
public Func<TItem, string>? CompositeFormat { get; set; }
[Parameter]
public override bool Sortable { get; set; }
@ -55,7 +58,11 @@ public class PropertyTableColumn<TItem, TProp> : TableColumn<TItem>
if (ChildContent == null)
{
if (!string.IsNullOrEmpty(Format) &&
if (CompositeFormat != null)
{
cellTextFunc = item => string.Format(CompositeFormat(item), compiledPropertyExpression(item));
}
else if (!string.IsNullOrEmpty(Format) &&
typeof(IFormattable).IsAssignableFrom(Nullable.GetUnderlyingType(typeof(TProp)) ?? typeof(TProp)))
{
cellTextFunc = item => ((IFormattable?)compiledPropertyExpression(item))?.ToString(Format, null);

View File

@ -4,7 +4,7 @@
<span>
Showing @FirstItem to @LastItem of @State.TotalItemCount results
</span>
<nav class="button-group">
<nav>
@if (State.CurrentPage == 1)
{
<span class="link link--disabled">Previous</span>