Magetwo 70954: Remove the component.clear from the custom options type. This causes the 'elem' array to become out of sync with the recordData#11824
Merged
magento-team merged 2 commits intomagento:2.2-developfrom Oct 31, 2017
Conversation
…e. This causes the 'elem' array to become out of sync with the recordData in the function mentioned in the comment above. Issue: 10291
magento-team
pushed a commit
that referenced
this pull request
Oct 31, 2017
…tom options type. This causes the 'elem' array to become out of sync with the recordData #11824
magento-team
pushed a commit
that referenced
this pull request
Oct 31, 2017
[EngCom] Public Pull Requests - 2.2-develop - MAGETWO-82955: [Backport 2.2-develop] FIX show visual swatches in admin - product attribute #11747 - MAGETWO-82943: Magetwo 70954: Remove the component.clear from the custom options type. This causes the 'elem' array to become out of sync with the recordData #11824 - MAGETWO-82710: Fix issue #10032 - Download back-up .tgz always takes the latest that's created (2.2-develop) #11595 - MAGETWO-81994: Products added to cart with REST API give total prices equal to zero #11458 - MAGETWO-81422: #11211 Fix Store View switcher #11337
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.
Description
The issue here is that when switching custom options types in the product edit screen, there can be instances where there is a perpetual spinner that is shown. In my findings, this was because there were 2 variables and 1 function that were checked to be 'in-sync' with each other as far as the length of items in each javascript array.
"recordData", "elems", and function "getChildItems". These three pieces were in the "dynamic-rows.js" file. As far as I could tell, the spinner in is not something that would ever make sense to be used in this case. However, because it was listed as an observable of elems, and elems was used for other things, it seemed to make more sense to find the cause of why elems would be 0 when it needed to match the getChildItems function.
Tracing this back, "elems" was part of the UiSelect object, and it was doing a component.clear() whenever the value of the option type selector changed. There is also no history from this file before: 566be67#diff-2c1b11e20e699888b25df7c484e62d20
So it was difficult to say if this was added in or generated. I search the code base for instances of uses of the UiSelect as a component to clear values, and didn't find anything that seemed exceptional, so I think this removal would be localized to only thes adminhtml custom options.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist