diff --git a/CHANGELOG.md b/CHANGELOG.md index 082d2115..a59d53fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fix poor behaviour on mobile when user needs to change item quantity ## [3.12.7] - 2023-03-28 diff --git a/react/AutocompleteBlock.tsx b/react/AutocompleteBlock.tsx index 046a72f0..ffccb452 100644 --- a/react/AutocompleteBlock.tsx +++ b/react/AutocompleteBlock.tsx @@ -385,7 +385,7 @@ const AutocompleteBlock: FunctionComponent = ({ min={unitMultiplier} step={unitMultiplier} onChange={(e: any) => { - if (e.target.value > 0) { + if (e.target.value >= 0) { setState({ ...state, quantitySelected: e.target.value, @@ -412,6 +412,7 @@ const AutocompleteBlock: FunctionComponent = ({ variation="primary" size="small" isLoading={loading} + disabled={state.quantitySelected === '' || state.quantitySelected < unitMultiplier} onClick={() => { callAddUnitToCart() }}