Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Filtering

Since 0.1.0-alpha.24
Filters and search keep each match with the rows above it, so the user sees where it belongs.

Matches and the rows above them

A filter or search in a tree list keeps each matching row and the rows above it, open, so the user sees where the match belongs. Set Filterable on a column, or Searchable on the tree list.

Static

Preview

Launch plan
Task
Owner
Status
Due

Code

Tasks.razor
@* A project plan: phases, their tasks, and the steps under some tasks. Filter by owner or status, or
   search, and each match keeps the phase and task above it, muted, so it's clear where it belongs. *@
<TreeList Items="_tasks" ItemKey="t => t.Id.ToString()" ItemParentKey="t => t.ParentId?.ToString()"
          Searchable QueryPrefix="plan-" Caption="Launch plan" Grow>
    <Columns>
        <PropertyColumn Property="t => t.Name" Title="Task" Filterable />
        <PropertyColumn Property="t => t.Owner" Filterable Width="10.Rem" />
        <PropertyColumn Property="t => t.Status" Filterable Width="9.Rem" />
        <PropertyColumn Property="t => t.Due" Format="MMM d" Sortable Width="7.Rem" />
    </Columns>
</TreeList>

@code {
    private readonly PlanTask[] _tasks =
    [
        new(1, null, "Research", "Nadia Park", Progress.Done, new(2026, 9, 26)),
        new(2, 1, "Interview customers", "Nadia Park", Progress.Done, new(2026, 9, 12)),
        new(3, 1, "Review competitors", "Owen Clarke", Progress.Done, new(2026, 9, 19)),
        new(4, 1, "Write the brief", "Nadia Park", Progress.Done, new(2026, 9, 26)),
        new(5, null, "Design", "Iris Novak", Progress.Doing, new(2026, 10, 31)),
        new(6, 5, "Wireframes", "Iris Novak", Progress.Done, new(2026, 10, 10)),
        new(7, 5, "Visual design", "Iris Novak", Progress.Doing, new(2026, 10, 24)),
        new(8, 7, "Color and type", "Iris Novak", Progress.Done, new(2026, 10, 17)),
        new(9, 7, "Icons", "Sam Ortiz", Progress.Doing, new(2026, 10, 24)),
        new(10, 5, "Usability test", "Owen Clarke", Progress.Todo, new(2026, 10, 31)),
        new(11, null, "Build", "Sam Ortiz", Progress.Todo, new(2026, 12, 12)),
        new(12, 11, "Sign-up flow", "Sam Ortiz", Progress.Doing, new(2026, 11, 14)),
        new(13, 11, "Billing", "Leo Brandt", Progress.Todo, new(2026, 11, 28)),
        new(14, 13, "Plans and prices", "Leo Brandt", Progress.Todo, new(2026, 11, 21)),
        new(15, 13, "Invoices", "Leo Brandt", Progress.Todo, new(2026, 11, 28)),
        new(16, 11, "Onboarding emails", "Nadia Park", Progress.Todo, new(2026, 12, 5)),
        new(17, null, "Launch", "Owen Clarke", Progress.Todo, new(2026, 12, 19)),
        new(18, 17, "Press release", "Owen Clarke", Progress.Todo, new(2026, 12, 15)),
        new(19, 17, "Launch post", "Nadia Park", Progress.Todo, new(2026, 12, 19)),
    ];
}

The rows above a match are muted, because they don't match themselves. Screen readers still read them.

The filters and the search are in the address, as in a DataGrid. While a filter is on, every row with a match under it opens; clearing the filter closes them again.

Keeping a match's branch

To keep the rows under a match too, set FilterBranch. A search for a category then lists its products, not just the category's row.

Static

Preview

Catalog
SKUPrice Stock

Code

Catalog.razor
@* A store's catalog: departments, categories and products. FilterBranch keeps everything under a
   match, so a search for a category lists its products. *@
<TreeList Items="_catalog" ItemKey="c => c.Sku" ItemParentKey="c => c.Parent" FilterBranch
          Searchable QueryPrefix="shop-" Caption="Catalog" Grow>
    <Columns>
        <PropertyColumn Property="c => c.Name" Sortable />
        <PropertyColumn Property="c => c.Sku" Title="SKU" Width="8.Rem" />
        <PropertyColumn Property="c => c.Price" Format="C" Sortable Width="7.Rem" />
        <PropertyColumn Property="c => c.Stock" Sortable Width="6.Rem" />
    </Columns>
</TreeList>

@code {
    private readonly CatalogEntry[] _catalog =
    [
        new("EL", null, "Electronics", null, null),
        new("EL-LAP", "EL", "Laptops", null, null),
        new("LP-1401", "EL-LAP", "Aero 14 laptop", 1099m, 34),
        new("LP-1602", "EL-LAP", "Studio 16 laptop", 1899m, 12),
        new("LP-1303", "EL-LAP", "Air 13 laptop", 899m, 58),
        new("EL-AUD", "EL", "Headphones", null, null),
        new("HP-0201", "EL-AUD", "Over-ear wireless headphones", 249m, 76),
        new("HP-0202", "EL-AUD", "Noise-canceling earbuds", 179m, 140),
        new("HM", null, "Home", null, null),
        new("HM-KIT", "HM", "Kitchen", null, null),
        new("KT-0301", "HM-KIT", "Pour-over coffee maker", 39m, 210),
        new("KT-0302", "HM-KIT", "Chef's knife", 89m, 64),
        new("HM-LGT", "HM", "Lighting", null, null),
        new("LT-0401", "HM-LGT", "Desk lamp", 59m, 95),
        new("LT-0402", "HM-LGT", "Floor lamp", 129m, 27),
    ];
}

Connection lost

Rejoining the server…