-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix string refs #14
base: master
Are you sure you want to change the base?
Fix string refs #14
Conversation
… because string refs break the rendering in the including app
); | ||
}; | ||
shouldComponentUpdate(nextProps, nextState) { | ||
if (nextProps.value != this.props.value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strict inequality operator should be used !==
if (position == 'top') return 'MMMM YYYY'; | ||
else return 'MMMM'; | ||
case 'week': | ||
if (position == 'top') return 'ww MMMM YYYY'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strict equality operator should be used ===
let hourWidth = width / 24; | ||
let iterLeft = 0; | ||
for (let i = 0; i < 24; i++) { | ||
result.push(<HeaderItem key={i} left={iterLeft} width={hourWidth} label={mode == 'shorttime' ? i : `${i}:00`} />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strict equality operator should be used ===
currentBottom = currentDate.format(this.getFormat(bottom)); | ||
box = this.getBox(currentDate, bottom, lastLeft.bottom); | ||
lastLeft.bottom = box.left + box.width; | ||
if (bottom == 'shorttime' || bottom == 'fulltime') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strict equality operator should be used ===
//Check boundaries to see if wee need to recalcualte header | ||
// if (this.needToRender()|| !this.cache){ | ||
// this.cache=this.renderHeader(); | ||
// this.setBoundaries(); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code should not be pushed.
The timeline (v 0.4.0) did not render in my app, because of errors related to string refs.
I fixed the ref assignments and added two missing dependencies (moment and sizeme).
A few failing tests are fixed now, but there are still two failing tests.
Nevertheless, at least the build of this branch is now working in my app.