Delete product in cart when we set zero qty and submit with Enter key#607
Merged
nicosomb merged 1 commit intoPrestaShop:developfrom Mar 15, 2024
Merged
Conversation
kpodemski
reviewed
Mar 8, 2024
| if (event.key === ENTER_KEY) { | ||
| updateQuantity(qtyInputGroup, 1); | ||
| if (qtyInput.value === '0') { | ||
| const targetItem = qtyInput.closest('.cart__item'); |
Contributor
There was a problem hiding this comment.
I guess we should introduce a new entry in the selector-map 🤔
https://github.com/PrestaShop/hummingbird/blob/develop/src/js/constants/selectors-map.ts
Contributor
matthieu-rolland
left a comment
There was a problem hiding this comment.
LGTM, except the selector to be added to the dedicated file as @kpodemski suggested 👍
b7a3545 to
6ec8f3d
Compare
matthieu-rolland
approved these changes
Mar 13, 2024
kpodemski
approved these changes
Mar 13, 2024
florine2623
approved these changes
Mar 14, 2024
Contributor
|
No loading animation when Enter is pressed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
we need to delete the product in cart when we set zero and type Enter to submit.
--
Additional info issue from the release tests
In Shopping cart page, when you put 0 on the quantity and press Enter, the product won't be removed ❌
The product is removed only when you click on the Checkmark.
Screen.Recording.2024-02-23.at.14.17.14.mov