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.

The members for filtering, and the types they use. Every member of IzzyBlazor.TreeList<TItem> is on the TreeList API.

Properties (4)

FilterBranchbool = falseAdded in 0.1.0-alpha.24

While filtering or searching, keeps the rows under a match too, not only the match and the rows above it: a search for a department shows its people.

Searchablebool = falseAdded in 0.1.0-alpha.24

A search box in the toolbar, across the text columns. The words go in the address (?search=) and reach an ItemsProvider as the request's Search. With no script they apply on Enter.

@bind-FilterFilter?Added in 0.1.0-alpha.24 @bind: Interactive only

The filter: Filter.All of a condition per filtered column (contains for text, between for numbers, equals for dates, equals or in for choices), or null for none. Binding it (@bind-Filter) on an interactive page keeps filters, sort and page in the component instead of the URL. Set it in C#, such as Filter.Where("status", FilterOperator.Equals, "Paid"); a condition no column's panel can show still applies, and shows as a tag that removes it.

FilterPanelbool = falseAdded in 0.1.0-alpha.24

A row below the rows that lists the active filters, each with a button to remove it, and Clear for all of them. It's there whether or not anything is filtered, so nothing moves.

Parts (1)

Components written inside TreeList, and the columns' members, which PropertyColumn, TemplateColumn and DynamicColumn share.

PropertyColumn<TItem, TValue>

A column that shows one property of each item, formatted, and can sort by it. The title and sort key come from the property ([Display(Name)] is used when present).

Filterablebool = false

Adds a filter button to this column's header. In a Table: a text box for text (matching anywhere, ignoring case), Min and Max boxes for numbers (keeping the values between them; either may be empty), a date input for dates (matching the day), a list of checkboxes for enums and booleans. In a DataGrid, text, numbers and dates choose an operator above the value. A TemplateColumn<T> filters by its FilterBy text.

Types (1)

Filter

record

A filter on data: a condition on one field (FieldFilter), conditions joined by and or or (FilterGroup), or the opposite of one (NotFilter). Fields are named by their key (a column's SortKey, or a DataField<T>'s Key). It becomes a LINQ expression on the fields' own properties, so an EF Core query filters in the database; a value never becomes code.

Filter members
MemberDescription
Parse(string text)

Reads a filter written in the subset of OData's $filter that ?filter= takes: total ge 100 and (status in ('Paid','Pending') or customer contains 'ada'). Comparisons (eq ne gt ge lt le), in, and or not, parentheses, contains, startswith and endswith (as functions or between field and value), date(field) eq 2026-01-31 for a day, and null. Text matches ignoring case, as a Table's filters do (OData's own contains matches case).

Find(string field)

The condition on field that every match must meet: this filter itself, or one inside its and groups (not inside an or group or a not). Null when there's none. For a provider that passes conditions on to an API: request.Filter?.Find("who")?.Value.

Connection lost

Rejoining the server…