Skip to content

Commit

Permalink
One by one. Quantity [Fix: Mobile experience]
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanlopezluna committed Jul 23, 2023
1 parent f354d4d commit 1c527c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion react/AutocompleteBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ const AutocompleteBlock: FunctionComponent<any & WrappedComponentProps> = ({
min={unitMultiplier}
step={unitMultiplier}
onChange={(e: any) => {
if (e.target.value > 0) {
if (e.target.value >= 0) {
setState({
...state,
quantitySelected: e.target.value,
Expand All @@ -412,6 +412,7 @@ const AutocompleteBlock: FunctionComponent<any & WrappedComponentProps> = ({
variation="primary"
size="small"
isLoading={loading}
disabled={state.quantitySelected === '' || state.quantitySelected < unitMultiplier}
onClick={() => {
callAddUnitToCart()
}}
Expand Down

0 comments on commit 1c527c3

Please sign in to comment.