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

when re-render in ie, all items move to top for moment(about 1s) #19

Closed
chocholand opened this issue May 31, 2017 · 8 comments
Closed

Comments

@chocholand
Copy link

"react-visjs-timeline": "^1.3.3",
"vis": "^4.20.0"

<Timeline options={options} items={mergeSortedArr} groups={groups} selectHandler={this.selectHandler} selection={this.selectedFolderIds} />

when this.selectedFolderIds is changed, all item move to top in IE 11.
before
2017-05-31 9 10 40

after
2017-05-31 9 10 30

@jwarykowski
Copy link
Contributor

Hi @chocholand, thanks for raising the issue. Do you get the same behaviour when using v4.19.1 of vis.js? The vis.js team released the latest version 10 days ago and it appears that there are a few issues.

@chocholand
Copy link
Author

@jonathanchrisp When I first tried v4.19.1, I got an error and upgraded to v.4.20.0. But the error exsit.

@jwarykowski
Copy link
Contributor

Hey @chocholand, what was the error reported?

@chocholand
Copy link
Author

@jonathanchrisp when selection value is changed, all item move to top for 1s.

@jwarykowski
Copy link
Contributor

Hey @chocholand, unfortunately, I can't do much without an error or a code snippet to be able to reproduce the error. If you're able to provide this would be greatly appreciated.

@chocholand
Copy link
Author

@jonathanchrisp I'm making reproduced the error your react boilerplate.
But, select item is not working.

class App extends Component {
  constructor(props) {
    super(props)

    this.state = {
      selectedIds: [1,2,3]
    }
  }
  render() {
    return (
      <div className="App">
        <p className="header">A basic timeline. You can move and zoom the timeline, and select items.</p>
        <Timeline
          {...basicExample}
        />
        <p className="header">This example demonstrate using groups. Note that a DataSet is used for both
          items and groups, allowing to dynamically add, update or remove both items
          and groups via the DataSet.</p>
        <Timeline
          {...groupsExample}
          selectHandler={this.selectHandler.bind(this)}
          selection={this.state.selectedIds}
        />
      </div>
    )
  }

  selectHandler(props) {
    const { items } = props
    this.setState({
      selectedIds: [5, 9, 18]
    })
  }
}

selection is not working.

@jwarykowski
Copy link
Contributor

Hey @chocholand, I've figured this out, I'll raise a PR to fix, really helped with the detailed code above. Thank you. I'll link this issue on the PR 🎉

jwarykowski added a commit to jwarykowski/react-visjs-timeline that referenced this issue Jun 1, 2017
@jwarykowski
Copy link
Contributor

Hey @chocholand, I've raised a PR to fix this issue here: #20. Hopefully, @willmcclellan might have time to quickly review this tomorrow 😄

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