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

Slick initializes with width:0, how to solve it without using JQuery? #3132

Closed
Carson12345 opened this issue Sep 20, 2017 · 0 comments
Closed

Comments

@Carson12345
Copy link

Carson12345 commented Sep 20, 2017

I am having similar issue as #235
That when I reload my page, the content all reinitializes with width:0, I am aware that resizing the page will solve but I have a limitation that I cannot write JQuery to force the window to resize.

Can I do something like $(window).trigger('resize'); in React but without using JQuery please?

screen shot 2017-09-20 at 4 54 12 pm

screen shot 2017-09-20 at 4 54 23 pm

My code now is

`render() {
const settings = {
dots: true,
arrows: true,
}

    return <div className={ rowClass.join(' ') }>
               <div className='sk-msg-wrapper'>
                   <div className={ containerClasses.join(' ') }
                        style={ style }
                        ref='messageContent'
                        onClick={ this.onMessageClick.bind(this) }>
                                      
                       { hasItems ? <div className={ cardListClasses.join(' ') }>
                            <Slider {...settings}>
 
                                          { cardList }

                             </Slider>
                                      </div>: null }
                                     
                   </div>`
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

1 participant