m3e/textarea_autosize
TextareaAutosize is a non-visual element used to automatically resize a textarea to fit its content.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
for: option.Option(String),
max_rows: Float,
min_rows: Float,
)
}
Constructors
-
Config( disabled: Disabled, for: option.Option(String), max_rows: Float, min_rows: Float, )
Disabled is whether auto-sizing is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
TextareaAutosize is a View Model for this component
Fields:
- disabled: Whether auto-sizing is disabled.
- for: The identifier of the interactive control to which this element is attached.
- max_rows: The maximum amount of rows in the
textarea. - min_rows: The minimum amount of rows in the
textarea.
pub opaque type TextareaAutosize
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_max_rows: Float
pub const default_min_rows: Float
pub fn disabled(
record: TextareaAutosize,
disabled: Disabled,
) -> TextareaAutosize
disabled sets the value of disabled for this TextareaAutosize.
pub fn for(
record: TextareaAutosize,
for: option.Option(String),
) -> TextareaAutosize
for sets the value of for for this TextareaAutosize.
pub fn from_config(config: Config) -> TextareaAutosize
from_config creates a new TextareaAutosize from the given configuration.
pub fn max_rows(
record: TextareaAutosize,
max_rows: Float,
) -> TextareaAutosize
max_rows sets the value of max_rows for this TextareaAutosize.
pub fn min_rows(
record: TextareaAutosize,
min_rows: Float,
) -> TextareaAutosize
min_rows sets the value of min_rows for this TextareaAutosize.
pub fn new() -> TextareaAutosize
new creates a new TextareaAutosize with the default configuration.
pub fn render(
model: TextareaAutosize,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a TextareaAutosize
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a TextareaAutosize Config