QuantityPicker
@shopify/shop-minis-platform-sdk / components/QuantityPicker/QuantityPicker
QuantityPickerProps
Properties
disabled?
optional
disabled:boolean
Optional boolean to disabled buttons
flex?
optional
flex:number
Optionally allow the quantity picker to have flexible width
label?
optional
label:string
Optional label to be rendered on the left of the picker.
maxQuantity?
optional
maxQuantity:number
Optional value to specify maximum selectable quantity. If no maximum is set, the picker can increment indefinitely.
minMaxFeedbackEnabled?
optional
minMaxFeedbackEnabled:boolean
Optional boolean to specify whether a feedback is displayed when the selected quantity reaches its upper or lower bounds. Defaults to true.
minQuantity?
optional
minQuantity:number
Optional value to specify minimum selectable quantity. It defaults to 1.
onDelete()?
optional
onDelete: () =>void
Optional event handler to remove product. If present, a delete button will render in place of the decrement button when minimum quantity is reached.
Returns
void
Memberof
QuantityPickerProps
onQuantityChange()
onQuantityChange: (
newQuantity
,userInteraction
) =>void
Required event handler to listen for changes made to quantity.
Parameters
Parameter | Type |
---|---|
newQuantity | number |
userInteraction | boolean |
Returns
void
quantity
quantity:
number
Required number to specify current selected quantity. If the quantity provided falls out of the determined bounds, the quantity will be corrected.
QuantityPicker()
QuantityPicker(
__namedParameters
):Element
Parameters
Parameter | Type |
---|---|
__namedParameters | QuantityPickerProps |
Returns
Element