TextField
Text field widget, wraps native <input type="text">. Supports two renditions,
'outlined' and 'filled':
Text field
// <code-header>
fiddle.title = 'Text field';
targetElement.toolbarItems = [
{
type : 'label',
text : 'Label position'
},
{
type : 'buttongroup',
toggleGroup : true,
rendition : 'tonal',
items : {
before : {
text : 'Before',
setting : 'before'
},
above : {
text : 'Above',
pressed : true,
setting : 'above'
},
default : {
text : 'Default',
setting : null
}
},
onToggle({ source }) {
if (source.pressed) {
for (const textField of source.up('fiddlepanel').widgets) {
textField.labelPosition = source.setting;
}
}
}
}
];
// </code-header>
const outlinedField = new TextField({
appendTo : targetElement,
width : '70%',
label : 'Outlined',
labelPosition : 'above',
labelWidth : '5em',
style : 'margin-bottom :1em'
});
const filledField = new TextField({
appendTo : targetElement,
width : '70%',
label : 'Filled',
rendition : 'filled',
labelPosition : 'above',
labelWidth : '5em'
});
// <code-footer>
targetElement.widgets = [outlinedField, filledField];
// </code-footer>This field can be used as an editor for the Column.
It is used as the default editor for the Column, TemplateColumn,
TreeColumn, and for other columns if another editor is not specified explicitly,
or disabled by setting false value.
Configs
110
Configs
110Common
listenersEvents
Field
maxLength: Number
The max number of characters for the input field
minLength: Number
The min number of characters for the input field
Other
Predefined style to use for the field. Possible values are:
'outlined'(default)'filled'
The supplied value will be part of the field's class list, as b-text-field-{rendition}.
autoSelectField
callOnFunctionsWidget
clearableField
columnWidget
editableField
keyStrokeChangeDelayField
nameField
placeholderField
readOnlyField
requiredField
revertOnEscapeField
rtlRTL
skipValidationField
spanWidget
triggersField
valueField
DOM
adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
insertBeforeWidget
insertFirstWidget
tagWidget
titleWidget
Float & align
alignWidget
anchorWidget
centeredWidget
constrainToWidget
draggableWidget
floatingWidget
hideAnimationWidget
maximizeOnMobileWidget
positionedWidget
scrollActionWidget
showAnimationWidget
xWidget
yWidget
Input element
autoCompleteField
inputAlignField
inputAttributesField
inputTagField
inputTypeField
inputWidthField
spellCheckField
tabIndexField
validateOnInputField
Label
hintField
hintHtmlField
labelLabelable
labelClsLabelable
labelPositionLabelable
labelsField
labelWidthLabelable
Layout
alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget
Misc
badgeBadge
bubbleEventsEvents
dataFieldWidget
defaultBindPropertyWidget
disabledWidget
elementAttributesWidget
ignoreParentReadOnlyWidget
localeClassLocalizable
localizableLocalizable
localizablePropertiesLocalizable
maskDefaultsWidget
maskedWidget
monitorResizeWidget
ownerWidget
preventTooltipOnTouchWidget
refWidget
rippleWidget
rootElementWidget
showTooltipWhenDisabledWidget
tabWidget
tooltipWidget
Scrolling
scrollableWidget
Properties
85
Properties
85Class hierarchy
Identifies an object as an instance of TextField class, or subclass thereof.
Identifies an object as an instance of TextField class, or subclass thereof.
isBadgeBadge
isDelayableDelayable
isEventsEvents
isFieldField
isFormulaFieldFormulaField
isKeyMapKeyMap
isLabelableLabelable
isLocalizableLocalizable
isRTLRTL
isValidatableValidatable
isWidgetWidget
Other
Predefined style to use for the field. Possible values are:
'outlined'(default)'filled'
The supplied value will be part of the field's class list, as b-text-field-{rendition}.
columnWidget
editableField
formulaFormulaField
inputField
isEmptyField
isEmptyInputField
isValidField
placeholderField
readOnlyField
requiredField
rtlRTL
spanWidget
triggersField
valueField
CSS
clsWidget
DOM
appendToWidget
contentWidget
contentElementWidget
datasetWidget
elementWidget
focusableElementWidget
focusElementWidget
htmlWidget
idWidget
insertBeforeWidget
insertFirstWidget
overflowElementWidget
styleWidget
Layout
alignSelfWidget
flexWidget
heightWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
scrollableWidget
widthWidget
Misc
badgeBadge
callOnFunctionsEvents
cellInfoWidget
disabledWidget
errorTipValidatable
labelLabelable
localeHelperLocalizable
localeManagerLocalizable
refWidget
tabWidget
tooltipWidget
Functions
64
Functions
64Configuration
Events
detachListenersBase
Misc
animatePropertyBase
callbackBase
downloadTestCaseBase
resolveCallbackBase
updateLocalizationLocalizable
Other
addListenerEvents
announceAriaLiveWidget
clearField
clearErrorValidatable
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
exitFullscreenWidget
focusWidget
getErrorsValidatable
hasListenerEvents
maskWidget
onEvents
recomposeWidget
relayAllEvents
removeAllListenersEvents
removeListenerEvents
requestFullscreenWidget
resumeEventsEvents
revertFocusWidget
selectField
setErrorValidatable
suspendEventsEvents
syncInputFieldValueField
triggerEvents
unEvents
unmaskWidget
Widget hierarchy
closestWidget
containsWidget
eachAncestorWidget
eachWidgetWidget
ownsWidget
queryWidget
queryAllWidget
upWidget
Events
19
Events
19actionField
beforeDestroyEvents
beforeHideWidget
beforeShowWidget
catchAllEvents
changeField
clearField
destroyEvents
elementCreatedWidget
focusInWidget
focusOutWidget
hideWidget
inputField
paintWidget
readOnlyWidget
recomposeWidget
resizeWidget
showWidget
triggerField
Event handlers
19
Event handlers
19onActionField
onBeforeDestroyEvents
onBeforeHideWidget
onBeforeShowWidget
onCatchAllEvents
onChangeField
onClearField
onDestroyEvents
onElementCreatedWidget
onFocusInWidget
onFocusOutWidget
onHideWidget
onInputField
onPaintWidget
onReadOnlyWidget
onRecomposeWidget
onResizeWidget
onShowWidget
onTriggerField
Typedefs
7
Typedefs
7AlignSpecWidget
BryntumListenerConfigEvents
CellWidgetContextWidget
ColorWidget
DelayableConfigDelayable
FieldTriggerConfigField
KeyMapConfigKeyMap
CSS variables
124
CSS variables
124| Name | Description |
|---|---|
--b-text-field-font-weight | Field's font-weight |
--b-text-field-padding | Field's padding |
--b-text-field-input-font-size | Input font-size |
--b-text-field-input-padding | Input padding |
--b-text-field-border-style | Field's border-style |
--b-text-field-outlined-border-radius | OutlinedOutlined field's border-radius |
--b-field-trigger-gap | Field trigger's gap (applied as padding to be clickable) |
--b-field-trigger-edge-gap | Gap between first / last field trigger and field edge (applied as padding to be clickable) |
--b-text-field-default-template-areas | Template areas to use when no `labelPosition` is set |
--b-text-field-default-template-columns | Template columns to use when no `labelPosition` is set |
--b-text-field-default-label-padding | Label padding to use when no `labelPosition` is set |
--b-text-field-border-radius | Field's border-radius |
--b-text-field-label-grid-area | Label grid-area, normally determined by used rendition |
--b-text-field-label-padding | Label padding |
--b-text-field-label-color | Label color |
--b-text-field-background | Field background, normally determined by used rendition |
--b-text-field-input-color | Input color (color of entered text) |
--b-text-field-input-height | Input height |
--b-text-field-border-color | Field border-color |
--b-text-field-label-above-grid-area | Label grid-area when the placed above |
--b-text-field-label-font-size | Label font-size |
--b-text-field-empty-label-font-size | Label font-size when field is empty |
--b-text-field-label-background | Label background |
--b-text-field-label-scale | Label scale (used by material) |
--b-text-field-empty-label-scale | Label scale when empty (used by material) |
--b-text-field-filled-background | FilledField background, when using filled rendition |
--b-text-field-filled-border-width | FilledField border-width, when using filled rendition |
--b-text-field-filled-border-radius | FilledField border-radius, when using filled rendition |
--b-text-field-filled-input-padding | FilledInput padding, when using filled rendition |
--b-text-field-filled-no-label-input-padding | FilledInput padding for field without label, when using filled rendition |
--b-text-field-filled-label-padding | FilledLabel padding, when using filled rendition |
--b-text-field-filled-label-before-padding | FilledPadding for label positioned before the field, when using filled rendition |
--b-text-field-filled-label-above-padding | FilledPadding for label positioned above the field, when using filled rendition |
--b-text-field-filled-empty-label-padding | FilledPadding for label of an empty field, when using filled rendition |
--b-text-field-outlined-background | OutlinedField background, when using outlined rendition |
--b-text-field-outlined-border-width | OutlinedField border-width, when using outlined rendition |
--b-text-field-outlined-border-color | OutlinedField border-color, when using outlined rendition |
--b-text-field-outlined-input-padding | OutlinedField input padding, when using outlined rendition |
--b-text-field-outlined-focus-border-width | OutlinedFocused field's border-width, when using outlined rendition |
--b-text-field-outlined-label-background | OutlinedLabel background, when using outlined rendition |
--b-text-field-outlined-label-padding | OutlinedLabel padding, when using outlined rendition |
--b-text-field-outlined-label-before-padding | OutlinedPadding for label positioned before the field, when using outlined rendition |
--b-text-field-outlined-label-above-padding | OutlinedPadding for label positioned above the field, when using outlined rendition |
--b-text-field-outlined-empty-label-padding | OutlinedPadding for label of an empty field, when using outlined rendition |
--b-text-field-material-label-position | Label position (material) |
--b-text-field-material-label-top | Label top (material) |
--b-text-field-material-label-left | Label left (material) |
--b-text-field-material-label-cursor | Label cursor (material) |
--b-text-field-filled-material-label-position | FilledLabel position property, using filled rendition in material |
--b-text-field-filled-material-label-top | FilledLabel top, using filled rendition in material |
--b-text-field-filled-material-label-left | FilledLabel left, using filled rendition in material |
--b-text-field-filled-material-label-cursor | FilledLabel cursor, using filled rendition in material |
--b-text-field-filled-material-empty-label-font-size | FilledFont-size for empty field's label, using filled rendition in material |
--b-text-field-filled-material-empty-label-top | FilledLabel top for empty field, using filled rendition in material |
--b-text-field-filled-material-empty-label-left | FilledLabel left for empty field, using filled rendition in material |
--b-text-field-filled-material-trigger-label-left | FilledLabel left for field with trigger, using filled rendition in material |
--b-text-field-filled-material-trigger-empty-label-left | FilledLabel left for empty field with trigger, using filled rendition in material |
--b-text-field-outlined-material-label-position | OutlinedLabel position property, using outlined rendition in material |
--b-text-field-outlined-material-label-top | OutlinedLabel top, using outlined rendition in material |
--b-text-field-outlined-material-label-left | OutlinedLabel left, using outlined rendition in material |
--b-text-field-outlined-material-label-cursor | OutlinedLabel cursor, using outlined rendition in material |
--b-text-field-outlined-material-empty-label-background | OutlinedBackground for empty field's label, using outlined rendition in material |
--b-text-field-outlined-material-empty-label-top | OutlinedLabel top for empty field, using outlined rendition in material |
--b-text-field-outlined-material-empty-label-left | OutlinedLabel left for empty field, using outlined rendition in material |
--b-text-field-outlined-material-trigger-empty-label-left | OutlinedLabel left for field with trigger, using outlined rendition in material |
--b-text-field-outlined-material-empty-label-padding | OutlinedLabel padding for empty field, using outlined rendition in material |
--b-field-trigger-color | Field trigger color |
--b-spin-trigger-font-size | Spin trigger icon font-size (number field) |
--b-text-field-color | Field color |
--b-text-field-default-width | Default width applied to a text field's is used in a toolbar, or not used in a Bryntum container (includes the label) |
--b-text-field-selection-background | Background for selected text |
| Disabled | |
--b-text-field-disabled-opacity | Field's opacity when disabled |
--b-text-field-trigger-disabled-color | Field trigger's color when disabled |
| Focused | |
--b-text-field-focus-border-style | Field's border-style when focused |
--b-text-field-filled-focus-background | FilledFocused field's background, when using filled rendition |
--b-text-field-filled-focus-border-width | FilledFocused field's border-width, when using filled rendition |
--b-text-field-filled-focus-label-color | FilledFocused field's label color, when using filled rendition |
--b-text-field-outlined-focus-background | OutlinedBackground for focused field, when using outlined rendition |
--b-text-field-outlined-focus-label-color | OutlinedLabel color for focused field, when using outlined rendition |
--b-text-field-focus-border-color | Focused field's border-color |
| Hovered | |
--b-text-field-hover-border-color | Field border-color when hovered |
--b-text-field-filled-hover-background | FilledHovered field's background, when using filled rendition |
--b-text-field-outlined-hover-border-color | OutlinedBorder color for hovered field, when using outlined rendition |
--b-text-field-outlined-hover-background | OutlinedBackground for hovered field, when using outlined rendition |
| Invalid | |
--b-text-field-invalid-border-color | Invalid field's border-color |
--b-text-field-invalid-label-color | Invalid field's label color |
| Read-only | |
--b-text-field-trigger-read-only-color | Field trigger's color when readonly |