Search

Find components, guides, and documentation

Input Amount: API Table

class: LionInputAmount, lion-input-amount

Fields

NamePrivacyTypeDefaultDescriptionInherited From
currencypublicstring | undefinedundefined
currencyLabelpublicstring''
formatterpublicformatAmount
localepublicstring | undefinedundefined
modelValuepublic
parserpublicparseAmount
placeholderpublicstring''LionInput
readOnlypublicbooleanfalseA Boolean attribute which, if present, indicates that the user should not be able to edit the value of the input. The difference between disabled and readonly is that read-only controls can still function, whereas disabled controls generally do not function as controls until they are enabled. (From: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly)LionInput
slotspublicLionInput
typepublicstring'text'LionInput
_currencyDisplayNodeSlotprotectedstring'after'The slot to put the currency display node in. Can be ‘prefix’, ‘suffix’, ‘before’ and ‘after’. Default will be ‘after’.
_feedbackConditionMetaprotectedLionField
_focusableNodeprotectedLionField
_inputNodeprotectedHTMLInputElementLionInput

Methods

NamePrivacyDescriptionParametersReturnInherited From
clearpublicClears modelValue. Interaction states are not cleared (use resetInteractionState for this)LionField
onLocaleChangedpublicnewLocale: string, oldLocale: string
resetpublicResets modelValue to initial value. Interaction states are clearedLionField
resetInteractionStatepublicLionField
_connectSlotMixinprotectedUpon connecting slot mixin, we should check if the required slot was created by the slot mixin, and if so, we should execute the currency changed flow which evaluates whether the slot node should be removed for invalid currencies
_onChangeprotectedDispatches custom bubble eventev: Event=LionField
_onCurrencyChangedprotected{ currency }, opts: @param {string?} opts.currency *
_reflectBackOnprotected

Events

NameTypeDescriptionInherited From
user-input-changedEventLionField

Attributes

NameFieldInherited From
currencycurrency
currency-labelcurrencyLabel
modelValuemodelValue
readonlyreadOnlyLionInput
typetypeLionInput
placeholderplaceholderLionInput