Skip to content

Commit bc8956b

Browse files
igozalipjm17971
authored andcommitted
Remaining bugs on TimeAxis (esnet#269)
Fix TimeAxis componentDidMount
1 parent 709dedd commit bc8956b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/components/TimeAxis.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ var TimeAxis = (function(_React$Component) {
143143
{
144144
key: "componentDidMount",
145145
value: function componentDidMount() {
146-
this.renderTimeAxis(this.props.scale, this.props.format);
146+
var _props = this.props,
147+
scale = _props.scale,
148+
format = _props.format,
149+
showGrid = _props.showGrid,
150+
gridHeight = _props.gridHeight;
151+
152+
this.renderTimeAxis(scale, format, showGrid, gridHeight);
147153
}
148154
},
149155
{

src/components/TimeAxis.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ const defaultStyle = {
5151
*/
5252
export default class TimeAxis extends React.Component {
5353
componentDidMount() {
54-
this.renderTimeAxis(this.props.scale, this.props.format);
54+
const { scale, format, showGrid, gridHeight } = this.props;
55+
this.renderTimeAxis(scale, format, showGrid, gridHeight);
5556
}
5657

5758
componentWillReceiveProps(nextProps) {

0 commit comments

Comments
 (0)