class documentation

A generic input field for the ACME text UI.

Class Submitted The message that is sent when the input field is submitted.
Method __init__ Initialize the input field.
Method compose Compose the input field.
Method setLabel Set the label of the field.
Method setSuggestions Set the suggestions for the input field.
Method show_validation_feedback Show the validation feedback.
Async Method submit Submit the input field.
Method value.setter Set the value of the input field.
Property inputField Return the input field.
Property msgField Return the message field.
Property value Return the value of the input field.
Instance Variable _fieldInput The input view of the input field.
Instance Variable _fieldLabel The label view of the input field.
Instance Variable _fieldMessage The message view of the input field.
Instance Variable _labelText The label text of the input field.
Instance Variable _placeholder The placeholder text of the input field.
Instance Variable _suggestions The suggestions for the input field.
Instance Variable _validators The validators of the input field.
Instance Variable _value The value of the input field.
def __init__(self, label: str = 'a label', value: str = '', suggestions: list[str] = [], placeholder: str = '', validators: Function = None, id: str = None):

Initialize the input field.

Parameters
label:strThe label of the input field.
value:strThe value of the input field.
suggestions:list[str]A list of suggestions for the input field.
placeholder:strThe placeholder for the input field.
validators:FunctionThe validators for the input field.
id:strThe ID of the input field.
def compose(self) -> ComposeResult:

Compose the input field.

Yields
The input field view.
def setLabel(self, label: str):

Set the label of the field.

Parameters
label:strThe label to set.
def setSuggestions(self, suggestions: list[str]):

Set the suggestions for the input field.

Parameters
suggestions:list[str]The suggestions to set.
@on(Input.Changed)
def show_validation_feedback(self, event: Input.Changed):

Show the validation feedback.

Parameters
event:Input.ChangedThe Input.Changed event that triggered the validation feedback.
@on(Input.Submitted, '#field-input')
async def submit(self, event: Input.Submitted):

Submit the input field.

Parameters
event:Input.SubmittedThe Input.Submitted event that triggered the submission.
def value(self, value: str):

Set the value of the input field.

Parameters
value:strThe value to set.
@property
inputField: Input =

Return the input field.

Returns
The input field.
@property
msgField: Label =

Return the message field.

Returns
The message field.
@property
value: str =

Return the value of the input field.

Returns
The value of the input field.
_fieldInput =

The input view of the input field.

_fieldLabel =

The label view of the input field.

_fieldMessage =

The message view of the input field.

_labelText =

The label text of the input field.

_placeholder =

The placeholder text of the input field.

_suggestions =

The suggestions for the input field.

_validators =

The validators of the input field.

_value =

The value of the input field.