pub trait TextAreaBuilder: Sized {
// Required methods
fn placeholder<M>(self, t: impl IntoText<M>) -> Self;
fn min_lines(self, lines: u32) -> Self;
fn max_lines(self, lines: u32) -> Self;
fn editable<M>(self, v: impl IntoReactive<bool, M>) -> Self;
fn selectable<M>(self, v: impl IntoReactive<bool, M>) -> Self;
fn spellcheck<M>(self, v: impl IntoReactive<bool, M>) -> Self;
fn on_submit(self, f: impl Fn() + 'static) -> Self;
}Expand description
Required Methods§
Sourcefn placeholder<M>(self, t: impl IntoText<M>) -> Self
fn placeholder<M>(self, t: impl IntoText<M>) -> Self
The empty-state prompt shown when the editor is empty (a constant, Signal<String>, or
closure, evaluated once for the initial value; not reactive after build).
Sourcefn min_lines(self, lines: u32) -> Self
fn min_lines(self, lines: u32) -> Self
The minimum height, in text lines (default 1): the editor never shrinks below this.
Sourcefn max_lines(self, lines: u32) -> Self
fn max_lines(self, lines: u32) -> Self
The maximum height, in text lines, before the editor scrolls internally. 0 (the
default) means unbounded: the editor keeps growing and never scrolls.
Sourcefn editable<M>(self, v: impl IntoReactive<bool, M>) -> Self
fn editable<M>(self, v: impl IntoReactive<bool, M>) -> Self
Whether the user can edit the text (default true; false = read-only). Reactive.
Sourcefn selectable<M>(self, v: impl IntoReactive<bool, M>) -> Self
fn selectable<M>(self, v: impl IntoReactive<bool, M>) -> Self
Whether the text can be selected and copied (default true). Reactive. Unsupported on
backends where selection is always on (GTK).
Sourcefn spellcheck<M>(self, v: impl IntoReactive<bool, M>) -> Self
fn spellcheck<M>(self, v: impl IntoReactive<bool, M>) -> Self
Whether spell-check / autocorrect highlighting is on (default true). Reactive.
Unsupported on backends with no built-in spell-check (GTK, Qt).
Sourcefn on_submit(self, f: impl Fn() + 'static) -> Self
fn on_submit(self, f: impl Fn() + 'static) -> Self
Submit on Enter: a plain Enter runs f instead of inserting a newline, the chat-composer
contract. Shift+Enter still inserts a line break on desktop and ArkUI; Android and
ArkUI show a Send action on the soft keyboard; iOS’s return key submits. Backends without
the intercept (web-dom today) keep inserting newlines, so pair this with a visible send button. The
bound text signal is already up to date when f runs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".