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

dragEnabled does not update on AbsoluteGrid #51

Open
muuhoffman opened this issue Oct 15, 2018 · 1 comment
Open

dragEnabled does not update on AbsoluteGrid #51

muuhoffman opened this issue Oct 15, 2018 · 1 comment
Labels

Comments

@muuhoffman
Copy link

muuhoffman commented Oct 15, 2018

I don't want my grid to be draggable at certain times, so I have some state that I update to tell the grid whether it is draggable or not. However, ever though the grid rerenders when the updating the state from isDragEnabled = true -> isDragEnabled = false, the grid still remains draggable. Is this a bug?

render() {
    const { classes } = this.props;

    if (this.state.items !== null) {
      return <div className={classes.root}>
        <h2>{this.state.title}</h2>
        <Votes />
        {/* dragEnabled and TextField do not play well, so don't allow dragging when creating a post */}
        <AbsoluteGrid 
          items={this.state.items} 
          dragEnabled={this.state.isDragEnabled}
          itemWidth={220}
          itemHeight={250}/>
      </div>
    } else {
      return <CircularProgress size={50} />
    }
  }
@jrowny jrowny added the bug label Jan 11, 2019
@jrowny
Copy link
Owner

jrowny commented Jan 11, 2019

Unfortunately it's only updating on mount/unmount. This is definitely a bug.

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

No branches or pull requests

2 participants