Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

FieldRepeater

Since 0.1.0-alpha.24
Rows of the same fields that people add and remove, such as invoice lines.

IzzyBlazor.FieldRepeater<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (12)

@bind-ItemsList<TItem>? requiredAdded in 0.1.0-alpha.24 @bind: Interactive only

The rows: a list the form's model holds, such as an invoice's lines. Use @bind-Items, whose expression names the posted fields.

ChildContentRenderFragment<TItem>?Added in 0.1.0-alpha.24

One row's fields, for its item (the Context). Bind each field to the item: @bind-Value="line.Description".

NewItemFunc<TItem>?Added in 0.1.0-alpha.24

A new row's item for Add. Unset, a new TItem.

Labelstring requiredAdded in 0.1.0-alpha.24

Names the group of rows, such as "Items": drawn above them and read before each row. Required.

AddTextstring? = "Add"Added in 0.1.0-alpha.24

The Add button's text, such as "Add item". Defaults to "Add".

ItemLabelFunc<int, string>? = "Item 1"Added in 0.1.0-alpha.24

A row's name, from its index (from 0): heads it when stacked, names its group and its Remove button. Defaults to "Item 1".

MinItemsint = 0Added in 0.1.0-alpha.24

The fewest rows: Remove hides at this count, and a post with fewer is invalid. Defaults to 0.

MaxItemsint?Added in 0.1.0-alpha.24

The most rows: Add hides at this count. Unset, no limit.

LayoutRepeaterLayout = RepeaterLayout.AutoAdded in 0.1.0-alpha.24

RepeaterLayout.Auto (the default): a table while the repeater is wide enough for its columns, else stacked. RepeaterLayout.Table or RepeaterLayout.Stacked always.

Disabledbool = falseAdded in 0.1.0-alpha.24

Shows the rows read-only, with no Add or Remove.

Noncestring? (computed)Added in 0.1.0-alpha.24

The nonce for its style element, when the page's CSP needs one. Defaults to IzzyTheme's.

Events (0)

No events.

Parts (1)

Components written inside FieldRepeater, documented here with it.

FieldRepeaterValue

A computed value in a FieldRepeater<T> row, such as a line's amount: shown under its own column heading in the table layout and with its label in the stacked one. It isn't a field, so it doesn't post.

Labelstring requiredAdded in 0.1.0-alpha.24

The column heading, and the value's label when the rows are stacked. Required.

WidthLength?Added in 0.1.0-alpha.24

The column's width in the table layout, such as Length.Rem(7). Unset, it shares the room left.

AlignCellAlign?Added in 0.1.0-alpha.24

Where the value sits in its column, such as CellAlign.End for an amount.

ChildContentRenderFragment?Added in 0.1.0-alpha.24

The value.

Types (3)

CellAlign

enum

How a table cell's content lines up.

CellAlign values
ValueDescription
Start

The start (left in left-to-right languages). The default for text.

Center

Centered.

End

The end (right in left-to-right languages). The default for numbers.

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

Px(double value)

Pixels.

Rem(double value)

Root ems (16px each by default).

Percent(double value)

Percent of the containing block.

Ch(double value)

Character widths, for text measures.

Vw(double value)

Percent of the viewport width.

Dvh(double value)

Percent of the dynamic viewport height (accounts for mobile browser bars).

Of(string css)

Any CSS length, such as calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.

RepeaterLayout

enum

How a FieldRepeater<T> lays out its rows.

RepeaterLayout values
ValueDescription
Auto

A table while the repeater is wide enough for its columns, else stacked. The default.

Table

Always a table: a row per item, the fields' labels as column headings.

Stacked

Always stacked: each row a group headed by its name, its fields one under another.

Connection lost

Rejoining the server…