Skip to content

Commit

Permalink
ensure props are not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jun 7, 2017
1 parent 4ff6bb6 commit e709cc8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from 'lodash';
import React, { Component } from 'react';

export class Simple extends Component {
Expand All @@ -6,7 +7,7 @@ export class Simple extends Component {
super(props);

this.state = {
params: props.scope.vis.params
params: _.cloneDeep(props.scope.vis.getCurrentState().params)
};

this.handleParam1Change = this.handleParam1Change.bind(this);
Expand Down

0 comments on commit e709cc8

Please sign in to comment.