ui/labeledfield/utils
module
Constants
module:ui/labeledfield/utils~createLabeledDropdownA helper for creating labeled dropdowns.
It creates an instance of a dropdown that is logically related to a labeled field view.
The helper does the following:
- It sets dropdown's
idandariaDescribedByIdattributes. - It binds input's
isEnabledto the labeled view.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown ); console.log( labeledInputView.fieldView ); // A dropdown instance.Copy code- It sets dropdown's
module:ui/labeledfield/utils~createLabeledInputNumberA helper for creating labeled number inputs.
It creates an instance of a input number that is logically related to a labeled view in DOM.
The helper does the following:
- It sets input's
idandariaDescribedByIdattributes. - It binds input's
isReadOnlyto the labeled view. - It binds input's
hasErrorto the labeled view. - It enables a logic that cleans up the error when user starts typing in the input.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber ); console.log( labeledInputView.fieldView ); // A number input instance.Copy code- It sets input's
module:ui/labeledfield/utils~createLabeledInputTextA helper for creating labeled inputs.
It creates an instance of a input text that is logically related to a labeled view in DOM.
The helper does the following:
- It sets input's
idandariaDescribedByIdattributes. - It binds input's
isReadOnlyto the labeled view. - It binds input's
hasErrorto the labeled view. - It enables a logic that cleans up the error when user starts typing in the input.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledInputText ); console.log( labeledInputView.fieldView ); // A text input instance.Copy code- It sets input's
module:ui/labeledfield/utils~createLabeledTextareaA helper for creating labeled textarea.
It creates an instance of a textarea that is logically related to a labeled view in DOM.
The helper does the following:
- It sets textarea's
idandariaDescribedByIdattributes. - It binds textarea's
isReadOnlyto the labeled view. - It binds textarea's
hasErrorto the labeled view. - It enables a logic that cleans up the error when user starts typing in the textarea.
Usage:
const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea ); console.log( labeledTextarea.fieldView ); // A textarea instance.Copy code- It sets textarea's