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: applyHtmlCode util should always clear targeted native element #926

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Nov 24, 2023

  • when calling applyHtmlCode when a native element, we use appendChild but of course that will append to what already exist, however in the case of the util we should always clear the target element first since that is what we do when passing html string (assigning with innerHTML will overwrite any previous content)
  • this was caught in one of the example when collapsing groups, we ended up seeing duplicate groups and this came up after converting SlickGroupItemMetadataProvider Formatter to return native element

image

- when calling `applyHtmlCode` when a native element, we use `appendChild` but of course that will append to what already exist, however in the case of the util we should always clear the target element first since that is what we do when passing html string (assigning with `innerHTML` will overwrite any previous content)
- this was caught in one of the example when collapsing groups, we ended up seeing duplicate groups and this came up after converting SlickGroupItemMetadataProvider Formatter to return native element
@ghiscoding ghiscoding merged commit 3167f5f into master Nov 24, 2023
2 checks passed
@ghiscoding ghiscoding deleted the bugfix/apply-clear-html-code branch November 24, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants