Skip to main content

Module text_input

Module text_input 

Source
Expand description

The text entry field used everywhere in datui.

One widget covers every shape of input the app needs. A single-line input submits on Enter and recalls previous values with the arrow keys; a multi-line input inserts newlines instead and recalls with Ctrl-P / Ctrl-N; a statement submits on Enter, breaks lines on Alt+Enter and wraps. Everything else, including the editing keys, is shared, so the query bar, the modal filter boxes and the view description all behave the same way.

Editing itself belongs to crate::widgets::textarea::TextArea, which this type owns. What is added here is theming, focus, and history of previously submitted values.

Modules§

history
Recall of previously submitted values for super::TextInput.

Structs§

TextInput
A themed, optionally history-backed text field.

Enums§

TextInputEvent
What a key press did to the input, for the caller to act on.
TextInputMode
Whether the field holds one line or many.