m3e/autocomplete

Autocomplete is enhances a text input with suggested options.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

     DO NOT EDIT

Types

AutoActivate is whether the first option should be automatically activated.

pub type AutoActivate {
  IsAutoActivate
  IsNotAutoActivate
}

Constructors

  • IsAutoActivate
  • IsNotAutoActivate

Autocomplete is a View Model for this component

Fields:

  • auto_activate: Whether the first option should be automatically activated.
  • case_sensitive: Whether filtering is case sensitive.
  • filter: Mode in which to filter options.
  • hide_selection_indicator: Whether to hide the selection indicator.
  • hide_loading: Whether to hide the menu when loading options.
  • hide_no_data: Whether to hide the menu when there are no options to show.
  • loading: Whether options are being loaded.
  • loading_label: The text announced and presented when loading options.
  • no_data_label: The text announced and presented when no options are available for the current term.
  • panel_class: Class or list of classes to be applied to the autocomplete’s overlay panel.
  • required: Whether the user is required to make a selection when interacting with the autocomplete.
  • results_label: The text announced when available options change for the current term.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type Autocomplete

CaseSensitive is whether filtering is case sensitive.

pub type CaseSensitive {
  IsCaseSensitive
  IsNotCaseSensitive
}

Constructors

  • IsCaseSensitive
  • IsNotCaseSensitive

Config is a public record for configuring this component.

pub type Config {
  Config(
    auto_activate: AutoActivate,
    case_sensitive: CaseSensitive,
    filter: autocomplete_filter_mode.AutocompleteFilterMode,
    hide_selection_indicator: HideSelectionIndicator,
    hide_loading: HideLoading,
    hide_no_data: HideNoData,
    loading: Loading,
    loading_label: String,
    no_data_label: String,
    panel_class: String,
    required: Required,
    results_label: String,
    for: option.Option(String),
  )
}

Constructors

HideLoading is whether to hide the menu when loading options.

pub type HideLoading {
  IsHideLoading
  IsNotHideLoading
}

Constructors

  • IsHideLoading
  • IsNotHideLoading

HideNoData is whether to hide the menu when there are no options to show.

pub type HideNoData {
  IsHideNoData
  IsNotHideNoData
}

Constructors

  • IsHideNoData
  • IsNotHideNoData

HideSelectionIndicator is whether to hide the selection indicator.

pub type HideSelectionIndicator {
  IsHideSelectionIndicator
  IsNotHideSelectionIndicator
}

Constructors

  • IsHideSelectionIndicator
  • IsNotHideSelectionIndicator

Loading is whether options are being loaded.

pub type Loading {
  IsLoading
  IsNotLoading
}

Constructors

  • IsLoading
  • IsNotLoading

Required is whether the user is required to make a selection when interacting with the autocomplete.

pub type Required {
  IsRequired
  IsNotRequired
}

Constructors

  • IsRequired
  • IsNotRequired

Slots are used in child elements to insert content into this component

pub type Slot {
  Loading
  NoData
}

Constructors

  • Loading
  • NoData

Values

pub fn auto_activate(
  record: Autocomplete,
  auto_activate: AutoActivate,
) -> Autocomplete

auto_activate sets the value of auto_activate for this Autocomplete.

pub fn case_sensitive(
  record: Autocomplete,
  case_sensitive: CaseSensitive,
) -> Autocomplete

case_sensitive sets the value of case_sensitive for this Autocomplete.

pub const default_auto_activate: AutoActivate
pub const default_case_sensitive: CaseSensitive
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_for: option.Option(String)
pub const default_hide_loading: HideLoading
pub const default_hide_no_data: HideNoData
pub const default_hide_selection_indicator: HideSelectionIndicator
pub const default_loading: Loading
pub const default_loading_label: String
pub const default_no_data_label: String
pub const default_panel_class: String
pub const default_required: Required
pub const default_results_label: String
pub fn filter(
  record: Autocomplete,
  filter: autocomplete_filter_mode.AutocompleteFilterMode,
) -> Autocomplete

filter sets the value of filter for this Autocomplete.

pub fn for(
  record: Autocomplete,
  for: option.Option(String),
) -> Autocomplete

for sets the value of for for this Autocomplete.

pub fn from_config(config: Config) -> Autocomplete

from_config creates a new Autocomplete from the given configuration.

pub fn hide_loading(
  record: Autocomplete,
  hide_loading: HideLoading,
) -> Autocomplete

hide_loading sets the value of hide_loading for this Autocomplete.

pub fn hide_no_data(
  record: Autocomplete,
  hide_no_data: HideNoData,
) -> Autocomplete

hide_no_data sets the value of hide_no_data for this Autocomplete.

pub fn hide_selection_indicator(
  record: Autocomplete,
  hide_selection_indicator: HideSelectionIndicator,
) -> Autocomplete

hide_selection_indicator sets the value of hide_selection_indicator for this Autocomplete.

pub fn loading(
  record: Autocomplete,
  loading: Loading,
) -> Autocomplete

loading sets the value of loading for this Autocomplete.

pub fn loading_label(
  record: Autocomplete,
  loading_label: String,
) -> Autocomplete

loading_label sets the value of loading_label for this Autocomplete.

pub fn new() -> Autocomplete

new creates a new Autocomplete with the default configuration.

pub fn no_data_label(
  record: Autocomplete,
  no_data_label: String,
) -> Autocomplete

no_data_label sets the value of no_data_label for this Autocomplete.

pub fn panel_class(
  record: Autocomplete,
  panel_class: String,
) -> Autocomplete

panel_class sets the value of panel_class for this Autocomplete.

pub fn render(
  model: Autocomplete,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a Autocomplete

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 Autocomplete Config

pub fn required(
  record: Autocomplete,
  required: Required,
) -> Autocomplete

required sets the value of required for this Autocomplete.

pub fn results_label(
  record: Autocomplete,
  results_label: String,
) -> Autocomplete

results_label sets the value of results_label for this Autocomplete.

pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

Search Document