Skip to main content

mb-quantity

Properties

PropertyAttributeTypeDefaultDescription
datadataQuantity | undefinedData of the element. Setting this will emit an input event automatically.
datatypedatatypestring | undefinedAn internal representation of type to handle serializing
defaultdefaultstringThe default unit to choose. Must be the value of a child mb-option element
disableddisabledboolean
hideunithideunitbooleanfalseHides the units. Make sure to set a default unit, or set it programatically.
isMbElementbooleantrue
labellabelstring | undefinedOptional label for the element
maxmaxstring | number
minminstring | number
pathpathstringPath of the data element. Use the VSCode extension to get the appropriate paths
requiredrequiredbooleanfalseRequired form validation
stepstepnumber
unitsMbUnit[][]

Methods

MethodTypeDescription
handleChildChange(): void
handleInput(e: CustomEvent<any>): void
handlePathChange(oldPath: string, newPath: string): void
handleSelect(e: CustomEvent<any>): void
reportValidity(): booleanFunction to validate the element during form submit

Events

EventDescription
mb-connectDispatched when the component connects
mb-dependencyDispatched if dependencies are needed from an external or parent source
mb-disconnectDispatched when the component disconnects
mb-inputDispatched when the input changes