Open KhushilMistry opened 5 years ago
Would you mind reproducing the error in a sample repo and sending me the link?
Before Resizing
After Resizing
Repo : https://github.com/KhushilMistry/Managi
Clone the repo. Commands to star: yarn && yarn start Go to: http://localhost:3000/signin Credentials: Email: khushil324@gmail.com Password: kbm123 Select any team from the following list. Go to Gantt Chart Tab.
Here, this.refs.timeline.offsetWidth is getting undefined after the mounting of the initial screen. So it's showing an error. Giving it some initial condition will solve the error. Something like this.
handleResize() {
this.setState({ timelineWidth: 0 });
this.setState({ timelineWidth: this.refs.timeline.offsetWidth || 1020 });
}
What do you think ? @codejamninja
I should get a chance to look at this issue sometime this week.
+1
@codejamninja did you get a chance to look at this? Would be cool because it is really a useful library :)
@thomaskleiven thank you for reminding me. I will get to it soon.
Uncaught TypeError: Cannot read property 'offsetWidth' of undefined at ReactGantt.handleResize (index.js:108) at index.js:93
Can you guide me here little?