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

chore(destroy): Review destroy method for JS components - FRONT-3610 #2392

Merged
merged 6 commits into from Apr 19, 2022

Conversation

papegaill
Copy link
Contributor

@papegaill papegaill commented Apr 13, 2022

The purpose of this PR is to review the destroy method for JavaScript components. After testing each component, I fixed the remove of some listeners for the following components:

  • Accordion
  • Carousel
  • News ticker

I also changed the way to re-initialize the components when adding/changing the ecl-rtl CSS resource.
In the current state, it does only work for the first addition of the resource. When you click the checkbox, the CSS <link> tag is added in the DOM and the onload function is executed. By clicking again the checkbox, the CSS resource remain (only media="max-width: 1px" is added to the <link> tag) and nothing happens.

I changed the logic by accessing the checkbox at manager level and resetting the component through the iframe preview.

@github-actions
Copy link

github-actions bot commented Apr 13, 2022

@planctus planctus merged commit 5357a13 into v3-dev Apr 19, 2022
@planctus planctus deleted the FRONT-3610 branch April 19, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants