React-slick: Bug with variableWidth and centerMode

Created on 13 Jul 2016  路  9Comments  路  Source: akiran/react-slick

Hello!

I have slider with this options

var options = {
        infinite: false,
        variableWidth: true,
        centerMode: true
}

When i swipe last slide to left or first slide to right, the slider throw error Cannot read property 'offsetWidth' of undefined; in getTrackLeft

Demo https://jsfiddle.net/t1ovuve8/

Most helpful comment

@akiran - Has there been any movement on this? I'm experiencing a similar issue with variableWidth = true and setting an initialSlide. Namely, the initial slide isn't brought into frame. Forcing an update after the component mounts makes it a little better, but the initial slide is still a little bit off.

It seems like you closed #325 which describes my issue, marking it as a duplicate of this.

All 9 comments

+1

+1

+1

Same here, it also occurs without infinite mode enabled, with just center mode.

@akiran - Has there been any movement on this? I'm experiencing a similar issue with variableWidth = true and setting an initialSlide. Namely, the initial slide isn't brought into frame. Forcing an update after the component mounts makes it a little better, but the initial slide is still a little bit off.

It seems like you closed #325 which describes my issue, marking it as a duplicate of this.

Similar issues have been fixed in previous releases, please try the latest version. If the issue still persists for you, please create a codesandbox demo and reopen it.

Unfortunately this issue still exists:
https://codesandbox.io/s/7m0qow8l9j

The referenced commit should do it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

walker-jiang picture walker-jiang  路  3Comments

PolGuixe picture PolGuixe  路  3Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments

vugman picture vugman  路  3Comments

eternalsky picture eternalsky  路  3Comments