m3e/paginator
Paginator is provides navigation for paged information, typically used with a table.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
first_page_label: String,
hide_page_size: HidePageSize,
items_per_page_label: String,
last_page_label: String,
length: Float,
next_page_label: String,
page_index: Float,
page_size: number_string.NumberString,
page_sizes: String,
page_size_variant: form_field_variant.FormFieldVariant,
previous_page_label: String,
show_first_last_buttons: ShowFirstLastButtons,
)
}
Constructors
-
Config( disabled: Disabled, first_page_label: String, hide_page_size: HidePageSize, items_per_page_label: String, last_page_label: String, length: Float, next_page_label: String, page_index: Float, page_size: number_string.NumberString, page_sizes: String, page_size_variant: form_field_variant.FormFieldVariant, previous_page_label: String, show_first_last_buttons: ShowFirstLastButtons, )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
HidePageSize is whether to hide page size selection.
pub type HidePageSize {
IsHidePageSize
IsNotHidePageSize
}
Constructors
-
IsHidePageSize -
IsNotHidePageSize
Paginator is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- first_page_label: The accessible label given to the button used to move to the first page.
- hide_page_size: Whether to hide page size selection.
- items_per_page_label: The label for the page size selector.
- last_page_label: The accessible label given to the button used to move to the last page.
- length: The length of the total number of items which are being paginated.
- next_page_label: The accessible label given to the button used to move to the next page.
- page_index: The zero-based page index of the displayed list of items.
- page_size: The number of items to display in a page.
- page_sizes: A comma separated list of available page sizes.
- page_size_variant: The appearance variant of the page size field.
- previous_page_label: The accessible label given to the button used to move to the previous page.
- show_first_last_buttons: Whether to show first/last buttons.
pub opaque type Paginator
ShowFirstLastButtons is whether to show first/last buttons.
pub type ShowFirstLastButtons {
IsShowFirstLastButtons
IsNotShowFirstLastButtons
}
Constructors
-
IsShowFirstLastButtons -
IsNotShowFirstLastButtons
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_first_page_label: String
pub const default_hide_page_size: HidePageSize
pub const default_items_per_page_label: String
pub const default_last_page_label: String
pub const default_length: Float
pub const default_next_page_label: String
pub const default_page_index: Float
pub const default_page_size: number_string.NumberString
pub const default_page_size_variant: form_field_variant.FormFieldVariant
pub const default_page_sizes: String
pub const default_previous_page_label: String
pub const default_show_first_last_buttons: ShowFirstLastButtons
pub fn disabled(
record: Paginator,
disabled: Disabled,
) -> Paginator
disabled sets the value of disabled for this Paginator.
pub fn first_page_label(
record: Paginator,
first_page_label: String,
) -> Paginator
first_page_label sets the value of first_page_label for this Paginator.
pub fn from_config(config: Config) -> Paginator
from_config creates a new Paginator from the given configuration.
pub fn hide_page_size(
record: Paginator,
hide_page_size: HidePageSize,
) -> Paginator
hide_page_size sets the value of hide_page_size for this Paginator.
pub fn items_per_page_label(
record: Paginator,
items_per_page_label: String,
) -> Paginator
items_per_page_label sets the value of items_per_page_label for this Paginator.
pub fn last_page_label(
record: Paginator,
last_page_label: String,
) -> Paginator
last_page_label sets the value of last_page_label for this Paginator.
pub fn length(record: Paginator, length: Float) -> Paginator
length sets the value of length for this Paginator.
pub fn next_page_label(
record: Paginator,
next_page_label: String,
) -> Paginator
next_page_label sets the value of next_page_label for this Paginator.
pub fn page_index(
record: Paginator,
page_index: Float,
) -> Paginator
page_index sets the value of page_index for this Paginator.
pub fn page_size(
record: Paginator,
page_size: number_string.NumberString,
) -> Paginator
page_size sets the value of page_size for this Paginator.
pub fn page_size_variant(
record: Paginator,
page_size_variant: form_field_variant.FormFieldVariant,
) -> Paginator
page_size_variant sets the value of page_size_variant for this Paginator.
pub fn page_sizes(
record: Paginator,
page_sizes: String,
) -> Paginator
page_sizes sets the value of page_sizes for this Paginator.
pub fn previous_page_label(
record: Paginator,
previous_page_label: String,
) -> Paginator
previous_page_label sets the value of previous_page_label for this Paginator.
pub fn render(
model: Paginator,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Paginator
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a Paginator Config
pub fn show_first_last_buttons(
record: Paginator,
show_first_last_buttons: ShowFirstLastButtons,
) -> Paginator
show_first_last_buttons sets the value of show_first_last_buttons for this Paginator.
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name