Skip to content
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

Slider doesn't update width without triggering component rerender. #1010

Closed
GeorgySerga opened this issue Feb 8, 2018 · 4 comments
Closed
Milestone

Comments

@GeorgySerga
Copy link

The issue is the same as here pretty much: #809 ,- without resize event, or any other trigger for components to rerender (modification of the props for example) the images inside slider do not adjust their size. Here is an example:
2

I took a look into this and was able to fix this using css calc() property, will PR soon.

@GeorgySerga
Copy link
Author

This one should also fix all of these: #600, #543 .

@laveesingh laveesingh added this to the .20 milestone Feb 19, 2018
@laveesingh
Copy link
Contributor

Just add a ref in wrapper:

<Slider {...settings} ref={slider => this.slider = slider}> ... </Slider>

and doing this.slider.innerSlider.onWindowResized() after setting states in wrapper, should take care of the updates.

@laveesingh
Copy link
Contributor

Will try to come up with a better js solution for this.

@laveesingh laveesingh reopened this Mar 1, 2018
@laveesingh laveesingh modified the milestones: .20, .21 Mar 7, 2018
laveesingh added a commit that referenced this issue Mar 22, 2018
@laveesingh
Copy link
Contributor

8591dac solves the problem. Changes will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants