Added various icons to use for input prefixes. Updated pagination cocmponent.

This commit is contained in:
2025-12-02 00:13:25 -05:00
parent de00bee801
commit e962832f24
18 changed files with 271 additions and 31 deletions

View File

@@ -2,6 +2,7 @@
@using JSMR.Application.Common.Search
@using JSMR.Application.VoiceWorks.Queries.Search
@using JSMR.UI.Blazor.Components
@using JSMR.UI.Blazor.Enums
@using JSMR.UI.Blazor.Filters
@using JSMR.UI.Blazor.Services
@using JSMR.UI.Blazor.Shared
@@ -23,10 +24,36 @@
PageNumberChanged="@(pageNumber => UpdateAsync(State with { PageNumber = pageNumber }))"
PageSize="@State.PageSize"
PageSizeChanged="@(pageSize => UpdateAsync(State with { PageSize = pageSize, PageNumber = 1 }))"
@bind-TotalItems="Result.TotalItems" />
@bind-TotalItems="Result.TotalItems">
<RightContent>
<BitDropdown Items="sortOptions"
Style="min-width: 17rem"
Placeholder="Select..."
TItem="BitDropdownItem<VoiceWorkSort>"
TValue="VoiceWorkSort"
Value="@State.Sort"
ValueChanged="@(value => UpdateAsync(State with { Sort = value }))">
<PrefixTemplate>
<InputPrefix Graphic="Graphic.Sort" Tooltip="Sort"></InputPrefix>
</PrefixTemplate>
</BitDropdown>
</RightContent>
</JPagination>
}
@code {
[Inject]
ILookupDataService Lookups { get; set; } = default!;
List<BitDropdownItem<VoiceWorkSort>> sortOptions = [];
protected override async Task OnInitializedAsync()
{
sortOptions = Lookups.GetSortOptions();
await base.OnInitializedAsync();
}
protected override VoiceWorkFilterState ParseStateFromUri(string absoluteUri)
=> VoiceWorkFilterState.FromQuery(new Uri(absoluteUri).Query);