-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 ui switcher element not cleaned up on input destroy #37512
base: 2.4-develop
Are you sure you want to change the base?
Fix ui switcher element not cleaned up on input destroy #37512
Conversation
Hi @smartexcan. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
This should be merged asap. It is a critical fix to broken functionality as reported by me in #39553 |
Description (*)
The ui switcher element is created by the ui form field element if it is enabled, and is added to the uiRegistry when it is initialized.
If the form field is then destroyed (either manually or from a
destroyInserted
of aninsert-form
) the switcher is not removed from the uiRegistry.This causes an issue if that form field is created again, as the previous switcher still exists and a new instance is not created, causing it to not be linked to the new form field.
Related Pull Requests
Fixed Issues (if relevant)
fixes #39553
Manual testing scenarios (*)
button
component, and amodal
component with aninsert-form
component.destroyInserted
on the insert-form,openModal
on the modal, andrender
on the insert-form.autoRender
to false.switcherConfig
for the checkbox field so that it enables/disables the input field when the checkbox is toggled.Questions or comments
Contribution checklist (*)