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: regression, Row Detail no longer displayed after CSP safe code #947

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Dec 9, 2023

with the CSP safe code implementation, the SlickRowDetail stopped working because it was using a hack. The hack was to using html string and add closing div tag to fall outside the .slick-cell but now that we use native HTML element then this hack no longer works. What we can do now is to add an optional insertElementAfterTarget that will provide a way to insert our Row Detail container element after our target which is this case is the .slick-cell

TODOs

  • replace HTML string with the use of native HTML element inside SlickRowDetail
  • add proper Cypress E2E tests to make sure that the row detail div is at the correct location in the DOM

before

image

after

image

the issue was because we append everything into the .slick-cell HTML element inside it but SlickRowDetail was hacking the html string to insert the HTML element after the .slick-cell. So our new code will simply do it in the correct way via insertElementAfterTarget

we can see below, the .dynamic-cell-detail div is supposed to go after the .slick-cell.l0.r0 but was instead within it which was wrong and causing the regression
image

@ghiscoding ghiscoding changed the title fix: Row Detail no longer displayed after CSP safe code implemented fix: Row Detail no longer displayed after CSP safe code implementation Dec 9, 2023
@ghiscoding ghiscoding changed the title fix: Row Detail no longer displayed after CSP safe code implementation fix: regression, Row Detail no longer displayed after CSP safe code Dec 9, 2023
@ghiscoding ghiscoding merged commit ba5cea9 into master Dec 9, 2023
2 checks passed
@ghiscoding ghiscoding deleted the bugfix/row-detail-insert-after branch December 9, 2023 21:06
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.

1 participant