EMention Mention
Examples
Mention
Multiline mentions, values and custom labels
Mention a member
Properties
accessibleNamestringName read by assistive technologies; provide a readable name for controls without text.
placeholderTextappendComponentComponentComponent slot for custom input append area or list end; null uses the default content. See this page’s examples for delegate context.
nullcheckIsWholevarCallback determining whether text is a complete mention token.
nullclearIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CIRCLE_XMARKclearableboolShow a clear action; ratings may be cleared by clicking the current score again.
falseechoModeenumDisplay mode for the input text.
TextInput.NormalTextInput.PasswordTextInput.NoEchoTextInput.PasswordEchoOnEdit
Dynamic bindingenabledboolAllow interaction; false disables the control.
truefilterOptionvarMention option filter (pattern, option), returning whether it is visible.
nullfitInputWidthboolMatch the suggestion popup width to the input.
truefontfontFont settings for the family, size and text style.
Common fields:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing
application fontformattervarFormatting callback converting a value to displayed text.
nullheaderDelegateComponentComponent slot for custom header; null uses the default content. See this page’s examples for delegate context.
nullheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightlabelDelegateComponentComponent slot for custom label; null uses the default content. See this page’s examples for delegate context.
nullloadingboolWhether the component is loading.
falseloadingDelegateComponentComponent slot for custom loading state; null uses the default content. See this page’s examples for delegate context.
nullmaximumLengthintMaximum allowed input characters.
32767offsetintOffset relative to layout, scroll target or popup reference, in pixels.
0optionsvarArray of selectable mention options.
Fields:
label, value, disabled
[]parservarInput parser converting displayed text to the underlying value.
nullpasswordVisibleboolDisplay the password as plain text.
falseplaceholderTextstringPlaceholder shown when the value is empty.
""placementstringPosition of the mention list relative to the editor.
"top" / "bottom"
"bottom"popupMaxHeightintMaximum suggestion popup height in pixels.
220popupWidthintPopup or menu width in pixels; 0 selects automatic width.
0prefixvarPrefix or suffix text; Mention prefix is a trigger character or character array.
"@"prefixComponentComponentComponent slot for custom prefix; null uses the default content. See this page’s examples for delegate context.
nullprefixIconintIcon used by the component.
EIcons.*
0 (no icon)
0prependComponentComponentComponent slot for custom input prepend area; null uses the default content. See this page’s examples for delegate context.
nullpropsvarObject configuring data field mappings and node behavior.
Fields:
label, value, disabled
({value: "value", label: "label", disabled: "disabled"})readOnlyboolPrevent user editing or rating while allowing programmatic value changes.
falseshowArrowboolShow the popup or tour arrow.
falseshowPasswordboolEnable password entry and visibility switching.
falseshowWordLimitboolShow the current character count and length limit.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaultsplitstringSeparator inserted after a committed mention.
" "styleTypeintSemantic color style.
EStyle.DefaultEStyle.PrimaryEStyle.SuccessEStyle.InfoEStyle.WarningEStyle.Danger
EStyle.PrimarysuffixComponentComponentComponent slot for custom suffix; null uses the default content. See this page’s examples for delegate context.
nullsuffixIconintIcon used by the component.
EIcons.*
0 (no icon)
0textstringDisplayed text.
""textColorcolorText color.
Dynamic bindingtypestringType of input editor.
"input" / "textarea"
"input"validateEventboolRequest enclosing-form validation when the value changes.
truevalidationMessagestringValidation message or externally supplied error text.
""validationStateintInput validation state.
EValidationState.NoneEValidationState.SuccessEValidationState.WarningEValidationState.Error
EValidationState.NonevisibleboolWhether the component is visible.
truewholeboolDelete mentions as complete tokens.
falsewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthactivePrefixstringRead onlyTrigger prefix used by the current mention token.
Computed at runtimedropdownVisibleboolRead onlyWhether the mention suggestion popup is visible.
Computed at runtimeeditorvarRead onlyInternal input reference for inspecting input state or managing focus.
Computed at runtimehasValidationErrorboolRead onlyWhether validation state is Error.
Computed at runtimeinputvarRead onlyInternal input reference for inspecting input state or managing focus.
Computed at runtimematchesvarRead onlyFiltered mention suggestion matches.
Computed at runtimementionPositionintRead onlyPosition of the current mention token in the text.
Computed at runtimetokenvarRead onlyToken information for the current mention input.
Computed at runtimetooltipvarRead onlyReference to the internal menu, popup or tooltip.
Computed at runtimewordCountintRead onlyCurrent input character count.
Computed at runtimeshowPasswordStrengthboolShow strength and rule checks while a password input is focused.
falsepasswordRulesvarPassword rules with label and minLength or pattern.
Show default value
[ {label: ELocale.texts.PasswordLength, minLength: 8}, {label: ELocale.texts.PasswordUppercase, pattern: /[A-Z]/}, {label: ELocale.texts.PasswordLowercase, pattern: /[a-z]/}, {label: ELocale.texts.PasswordNumber, pattern: /[0-9]/}, {label: ELocale.texts.PasswordSymbol, pattern: /[^A-Za-z0-9]/} ]passwordStrengthrealRead onlyFraction of passed password rules, from 0 to 1.
Show default value
passwordRequirements.length ? passwordRequirements.filter(function(rule) { return rule.passed }).length / passwordRequirements.length : 0passwordRequirementsvarRead onlyRule results with label and passed fields.
Show default value
Array.isArray(passwordRules) ? passwordRules.map(function(rule) { let passed = false try { if (rule && rule.minLength !== undefined) passed = text.length >= Number(rule.minLength) else if (rule && rule.pattern) { const expression = new RegExp(rule.pattern) passed = expression.test(text) } } catch (error) { passed = false } return {label: rule && rule.label ? String(rule.label) : "", passed: passed} }) : []Signals
cleared()Emitted after the contents are cleared with the clear action.
formatFailed(string message)Emitted when input formatting fails; message explains why.
mentioned(var value)Emitted when a mention is inserted; value is the selected mention value.
selected(var value, string prefix)Emitted when a mention candidate is selected; value is its value and prefix is the current trigger prefix.
searched(string pattern, string prefix)Emitted when searching mention candidates; pattern is the query and prefix is the trigger prefix.
wholeRemoved(string pattern, string prefix)Emitted when a whole mention is removed; pattern is its text and prefix is its prefix.
Methods
close()Close the component panel or popup.
open()Open the component panel or popup.
choose(index)Choose the suggestion at index.