TextInput
TextInput is the app-level text-entry control. Its render mode chooses the
editing surface:
tv: a composed row that opens Hosanna's keyboard dialog on OK;web: an embeddedTextEditBox;mobile: an embeddedNativeVoiceTextEditBoxusing the native IME; orauto: mobile on native phone/tablet runtimes, web on web phone/tablet runtimes, and TV elsewhere.
TextInput({
id: 'email',
text: this.email,
placeholderText: 'Email address',
inputType: TextInputType.Email,
renderMode: 'auto',
})
.onTextChange((event) => {
this.email = event.text;
})
.onSubmit(() => {
this.getSubView<TextInputView>('password', true)?.focusNativeInput();
});
TextInputType values are Text, Password, Number, and Email.
Password mode masks the composed TV label and enables secure mode on native
edit controls.
Key fields include text, isActive, placeholderText, inputType,
renderMode, onTextChange, onSubmit, inputErrorHint, and the
background/focus/icon/text style fields.
onSubmit is emitted by web/native edit controls when Enter or Done is used.
The TV keyboard-dialog path reports accepted text through onTextChange and
does not emit onSubmit.
focusNativeInput() and blurNativeInput() control the system keyboard in
mobile mode. They are no-ops in TV and web modes.