Skip to content

Commit

Permalink
re-render after width and height update
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Mar 14, 2019
1 parent 77305ed commit 7b60072
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-flip-numbers",
"version": "2.1.3",
"version": "2.1.4-beta.2",
"description": "react flip your numbers",
"main": "lib/index.js",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions src/flipNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default class FlipNumber extends React.Component<Props, State> {
shouldComponentUpdate(nextProps: Props) {
return (
nextProps.activeNumber !== this.props.activeNumber ||
nextProps.height !== this.props.height ||
nextProps.width !== this.props.width ||
this.state.degree === 0 ||
nextProps.play !== this.props.play
);
Expand Down
2 changes: 2 additions & 0 deletions src/flipNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default class FlipNumbers extends React.Component<Props> {
shouldComponentUpdate(nextProps: Props) {
return (
nextProps.numbers !== this.props.numbers ||
nextProps.height !== this.props.height ||
nextProps.width !== this.props.width ||
nextProps.durationSeconds !== this.props.durationSeconds ||
nextProps.delaySeconds !== this.props.delaySeconds ||
nextProps.play !== this.props.play
Expand Down

0 comments on commit 7b60072

Please sign in to comment.