svelte-swipe
svelte-swipe copied to clipboard
Adding Images after init
If I init the gallery with an empty array of images which gets filled later by an aysnc request, the images are all displayed but there is no interactivity.
Can images be added dynamically?
Noticed that issue a little while ago. Shortly I will start working on it. Thanks
Thanks Sharif. Nice little gallery otherwise. I have it wrapped in an await so it doesn't render prematurely but nicer to let it bound to dynamic data.
@CraigChamberlain I'm curious, what was your temporary approach with await?
My issue is that on the initial load, the slides I'm looping through appear on top of one another. I tried wrapping it in an await like so:
{#await $store then items}
<Swipe {...swipeConfig} bind:this={SwipeComp}>
{#each items as { title }}
<SwipeItem>
{title}
<SwipeItem />
{/each}
<Swipe />
{/await}
In my case, I'm making a GraphQL query and setting the store in the
Hi,
I don't think I did any binding I just laid all the markup out in one file. I did do some css which gave the images a height andnaybe width while it initialised. Seems like a styling issue.
On Thu, 13 May 2021, 23:58 Nick Jessop, @.***> wrote:
@CraigChamberlain https://github.com/CraigChamberlain I'm curious, what was your temporary approach with await?
My issue is that on the initial load, the slides I'm looping through appear on top of one another. I tried wrapping it in an await like so:
{#await $store then items} <Swipe {...swipeConfig} bind:this={SwipeComp}> {#each items as { title }} <SwipeItem> {title} <SwipeItem /> {/each} <Swipe /> {/await} In my case, I'm making a GraphQL query and setting the store in the
@nickjessop were you able to find a solution for this?
@SharifClick I'm also facing this issue - could you let us know if you're planning to work on it and the current status/ETA? Thanks!
Hi @aditivin I am working on some bugs and features right now, will look into it shortly.
I am experiencing the same issue on load, the slides all appear stacked on top of each another.