-
Notifications
You must be signed in to change notification settings - Fork 766
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
Elements created with map added outside target slot #897
Comments
I have the same issue. When I try to replace |
@davidrleonard - I can use the sample code provided above to duplicate this issue when using Stencil Please try your sample app using the latest starter. If this is still an issue for you, please provide a simple application that reproduces the issue via GitHub and I will re-open it. |
Reopenning as this can be duplicated by using Example: https://github.com/kensodemann/test-slot |
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out. Thank you for using Stencil! |
reopening as this is still an issue with a community member I am working with. |
A community member I am working with was asking about this so I freshened up my sample project (https://github.com/kensodemann/test-slot) a bit as follows: Updated my sample project to Stencil The issue occurs with the following component configuration in @Component({
tag: 'friends-list',
// shadow: true
scoped: true
}) Swapping from |
Duplicated this without the use of https://github.com/kensodemann/out-of-slot-rendering Code is based on some real-life code from the community member I am working on but greatly simplified and without any of their custom code (just using our PWA toolkit with @ionic/core components). |
My repro repo is using |
@adamdbradley - PR #1197 contains a karma test that can be used to duplicate this issue. |
Also simplified the sample app: https://github.com/kensodemann/out-of-slot-rendering and provided three conditions in the README.md file with different behaviors given different uses of shadow DOM and light DOM. |
Not trying to pollute this thread with unrelated talk, but btw, thanks for spending the time to hunt this down. Look forward to seeing a patch land to address it. 🚀 |
any updates on this one? I am still facing this with |
@seifsay3d I have reproduced this issue in version See #1997 (Demo repo: https://github.com/petermikitsh/stencil-vdom-bug) |
For anyone who is struggling with this problem, one possible 'hack' is to provide the content as props for the data that will change, and use slots only for static data :/ |
I'm close to a workaround here... If I include the webcomponents polyfills ( The issue now is that it seems like whatever stencil does to detect if it needs to use scoped styles is tied together with what it uses to determine if it needs to do the slots fallback, so now styles are broken. This seems to be because older browsers don't understand the If there was a way to configure |
Just encountered this problem, what should I do about it? I'm using custom element for table component and misplaced rows are really problematic |
btw I'm using:
|
I'm also getting the same issue using @stencil/core v1.9.0-11 |
Stencil version:
I'm submitting a:
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
map
inside of arender()
function to iterate over state data, create elements, and pass the elements into a slotparentElement
of the slot's ownermap
runs againparentElement
of null. They new elements are weirdly appended to the end of the slot owner's shadow root, and do not appear in the slot owner'schildren
list. The new elements appear visually after all of their slot owner's shadow root content. The elements that were created before stay in the same place and work as expected.Expected behavior:
1-3: Same
4. The new elements are rendered into their slot just like the original elements. The new elements have a
parentElement
of the slot owner and appear visually in the correct place.Steps to reproduce:
index.html
:my-app.tsx
:friends-list.tsx
:npm run dev
and open the demo in ChromeRelated code:
See above.
Other information:
OS: macOS Sierra 10.13.2
Browser: Chrome Stable Version 66.0.3359.181 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: