FieldRepeater
Since 0.1.0-alpha.24IzzyBlazor.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>? requiredThe 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>?One row's fields, for its item (the Context). Bind each field to the item: @bind-Value="line.Description".
NewItemFunc<TItem>?A new row's item for Add. Unset, a new TItem.
Labelstring requiredNames the group of rows, such as "Items": drawn above them and read before each row. Required.
AddTextstring? = "Add"The Add button's text, such as "Add item". Defaults to "Add".
ItemLabelFunc<int, string>? = "Item 1"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 = 0The fewest rows: Remove hides at this count, and a post with fewer is invalid. Defaults to 0.
MaxItemsint?The most rows: Add hides at this count. Unset, no limit.
LayoutRepeaterLayout = RepeaterLayout.AutoRepeaterLayout.Auto (the default): a table while the repeater is wide enough for its columns, else stacked. RepeaterLayout.Table or RepeaterLayout.Stacked always.
Disabledbool = falseShows the rows read-only, with no Add or Remove.
Noncestring? (computed)The nonce for its style element, when the page's CSP needs one. Defaults to IzzyTheme's.
Plus 17 item props and 4 common props.
Show them hereEvents (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 requiredThe column heading, and the value's label when the rows are stacked. Required.
WidthLength?The column's width in the table layout, such as Length.Rem(7). Unset, it shares the room left.
AlignCellAlign?Where the value sits in its column, such as CellAlign.End for an amount.
ChildContentRenderFragment?The value.
Types (3)
CellAlign
enumHow a table cell's content lines up.
| Value | Description |
|---|---|
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
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
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 |
Css string | The CSS value this length renders as. |
RepeaterLayout
enumHow a FieldRepeater<T> lays out its rows.
| Value | Description |
|---|---|
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. |