Fix string refs#14
Open
drdla wants to merge 3 commits intoguiqui:masterfrom
Open
Conversation
… because string refs break the rendering in the including app
bikkimahato
reviewed
Dec 18, 2021
| ); | ||
| }; | ||
| shouldComponentUpdate(nextProps, nextState) { | ||
| if (nextProps.value != this.props.value) { |
There was a problem hiding this comment.
Strict inequality operator should be used !==
Comment on lines
+43
to
+46
| 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.
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.
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.
Strict equality operator should be used ===
Comment on lines
+195
to
+199
| //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.
Commented code should not be pushed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.