Open jasonhibbs opened 7 months ago
What are you using to modify the layer? It seems like the source & layer are being re-added & the components are not unMounted (or re-added before they are able to be removed). Ideally modifying the layer should not require a reload of the layers/sources? I could be wrong here though.
If you are able to link a fork of the playground where you have reproduced this it would speed up debugging greatly.
Ah this is just during development, i.e. typing, saving, seeing browser updates. I’ll try to get a repro over soon.
Ahh I see. Good chance this is just caused by Nuxts HMR replacing the source & layer component in a weird way. Shouldn't be a problem in real situations. I will work on adding some checks to avoid this though and try to make HMR work properly.
Hello
I think I'm facing the same issues but not with HMR, page navigation causes this issue for me.
Also I think it's worth mentioning that I'm using <NuxtPage :keepalive="false" />
.
I don't know if there's any other info that could be of use here, but I'm happy to help identify further causes and possibly also help implementing a fix :)
Hello
I think I'm facing the same issues but not with HMR, page navigation causes this issue for me. Also I think it's worth mentioning that I'm using
<NuxtPage :keepalive="false" />
.I don't know if there's any other info that could be of use here, but I'm happy to help identify further causes and possibly also help implementing a fix :)
Please open a new issue if this is happening to you in production, the original case here only happens while making changes in development.
If you are able to provide a reproduction I can look into what the issue is
Seen: While working on sources with multiple layers, after every edit & save, sources complain that they can’t be removed before layers, and layers complain they already exist, requiring a browser refresh after every edit.
Desired: Ideally, layers and sources take care of themselves and don’t require refreshing the browser.
Repro:
circle-color
More detail: It may be relevant that I have grouped my source and layers into a component, like this:
app.vue
mapLayerStations.vue
Final thing to add, in similar projects, I vaguely recall resorting to making my slot conditional, but it may well be more convenient than robust: