Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unnecessary emissions of the getCurrentBasket selector if the ba… #1234

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

SGrueber
Copy link
Collaborator

@SGrueber SGrueber commented Aug 4, 2022

…sket loading state changes

PR Type

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

If the basket loading state changes the getCurrentBasket selector always emits a value even if the basket doesn't change. This leads, inter alia, to a further rendering of the basket item list after a basket item quantity has been changed, a basket item has been deleted or maybe other actions like assigning a cost center to basket and so on.
After entering a basket item quantity on basket page the original quantity is displayed shortly during the basket update (loading).

Issue Number: Closes #

What Is the New Behavior?

The getCurrentBasket item only emits a value if the basket object, the basket validation or info changes but not if the loading state changes.
After updating a basket item quantity on basket page the entered quantity remains in the input field.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#78637

@SGrueber SGrueber requested a review from MaxKless August 4, 2022 08:44
@SGrueber SGrueber self-assigned this Aug 4, 2022
@SGrueber SGrueber added bug Something isn't working performance Performance improvements labels Aug 4, 2022
@SGrueber SGrueber added this to the 3.0 milestone Aug 4, 2022
@SGrueber SGrueber merged commit d22ba7d into develop Aug 4, 2022
@SGrueber SGrueber deleted the bugfix/basket_selector_memoization branch August 4, 2022 12:59
clindeIntershop pushed a commit that referenced this pull request Aug 11, 2022
fix: unnecessary emissions of the getCurrentBasket selector if the basket loading state changes

Co-authored-by: Danilo Hoffmann dhhyi@aol.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants