react-slick icon indicating copy to clipboard operation
react-slick copied to clipboard

Slider freezes after adding and removing items

Open Pave91 opened this issue 11 years ago • 10 comments

When I manipulate with items (add or remove items many times) through state (I have own state for items) and meanwhile user click on next arrow, carousel freezes and it's not possible to move slider back or forward. I load next items through ajax.

Pave91 avatar Oct 08 '15 09:10 Pave91

I am facing the same issue. If the browser is kept open for long and if we get back to the same page, the slider freezes and its not possible to move between slides

nutank avatar Oct 08 '15 14:10 nutank

For me, this happens when clicking on the next/prev arrow while another slide transition is running. I am not changing the contents of the slider.

danielbuechele avatar Oct 08 '15 15:10 danielbuechele

What I found out is, the slider freezing is caused by this.state.animation on InnerSlider not being set back to false. However, I didn't found a fix for this yet. To me it looks like some kind of concurrency problem where e.g. the callback that should set animating to false is fired to early.

danielbuechele avatar Oct 15 '15 09:10 danielbuechele

Thanks for digging into the issue. I will try to fix it today

On Thu, Oct 15, 2015 at 3:14 PM, Daniel Büchele [email protected] wrote:

What I found out is. The slider freezing is caused by this.state.animation on InnerSlider not being set back to false. However, I didn't found a fix for this yet. To me it looks like some kind of concurrency problem where e.g. the callback that should set animating to false is fired to early.

— Reply to this email directly or view it on GitHub https://github.com/akiran/react-slick/issues/140#issuecomment-148336112.

akiran avatar Oct 15 '15 09:10 akiran

Perfect! Thank you guys.

Pave91 avatar Oct 15 '15 11:10 Pave91

Added fix proposed by @danielbuechele and released 0.8.1 @Pave91 @nutank Please check if it solves your problem.

akiran avatar Oct 20 '15 16:10 akiran

I think you need to also remove the lock from this part (https://github.com/digitalegarage/react-slick/commit/a5fe2a75bf8535157cc901bbc148932288b71460) Also I am wondering what the lock was for in the first place and if it makes sense to remove it completely or would something break if it is removed?

danielbuechele avatar Oct 21 '15 03:10 danielbuechele

SItuation is better now, but still in some situations carousel freezes. I'm wondering the same thing like @danielbuechele .

Pave91 avatar Oct 21 '15 08:10 Pave91

setting a state prop on beforeSlider event, that dont have nothing to do with the slider. also frezee it.

jjalonso avatar Oct 26 '15 03:10 jjalonso

this appears to not be fixed as of 0.9.2

mmmurf avatar Nov 30 '15 20:11 mmmurf