Skip to main content

CaProductQuantity

Used to modify quantity of products

SASS-path: ./styles/components/molecules/ca-product-quantity.scss

Props

NameDescriptionTypeRequiredDefault
quantityThe quantity to be modifiedNumbertrue-
inputDisabledUsed to disable user input in the input fieldBooleanfalsefalse
maxQuantityWhat is the maximum quantity? Stock statusNumbertrue-
minQuantityWhat is the minimum quantity? Default 1Numberfalse1
thresholdThreshold to stop at and emit event. Used for cart vs product page stock handlingNumberfalse-1
typeDifferent style types for the counterdefault, round, stackedfalsedefault

Events

Event NameDescriptionParameters
changedCount has been changednew count (Number)
thresholdReachedThreshold count reached-
maxReachedMax count reached-
minReachedMin count reached-

Methods

MethodDescriptionParameters
updateUpdate count-
increaseIncrease count by one-
decreaseDecrease count by one-
validateEmptyIf field is empty on blur, set to minimum count-
validateInputValidate count input field. Can only contain number and not be above or below max count-