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

react-masonry-component doesn't respect masonry's initLayout setting #54

Open
jrmyio opened this issue Oct 15, 2016 · 1 comment
Open

Comments

@jrmyio
Copy link

jrmyio commented Oct 15, 2016

I am trying to handle the call of .layout() myself and looking at masonry's docs one can disable the layout by setting initLayout to false.

However this component doesn't use this option to disable the following lines that trigger layout:

    componentWillReceiveProps: function() {
        this._timer = setTimeout(function() {
            this.masonry.reloadItems();
            this.isMounted && this.isMounted() && this.forceUpdate();
        }.bind(this), 0);
    },

    componentDidUpdate: function() {
        this.performLayout();
        this.imagesLoaded();
    },
@afram
Copy link
Collaborator

afram commented Oct 18, 2016

Yeah that's something that can be added easy enough. Are you comfortable enough to submit the required changes in a backwards compatible way?

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

No branches or pull requests

2 participants