File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ import React from 'react';
2
2
import createReactClass from 'create-react-class' ;
3
3
import PropTypes from 'prop-types' ;
4
4
import { storiesOf , action } from '@storybook/react' ;
5
+ import cloneDeep from 'lodash.clonedeep' ;
5
6
import IconSettings from '../../icon-settings' ;
6
7
7
8
import { TREE } from '../../../utilities/constants' ;
8
9
import sampleNodes from '../../../utilities/sample-data/tree' ;
9
10
11
+
10
12
import Tree from '../../tree' ;
11
13
import Search from '../../forms/input/search' ;
12
14
@@ -38,7 +40,7 @@ const DemoTree = createReactClass({
38
40
? sampleNodes [ this . props . exampleNodesIndex ]
39
41
: sampleNodes . sampleNodesDefault ;
40
42
return {
41
- nodes : initalNodes ,
43
+ nodes : cloneDeep ( initalNodes ) ,
42
44
selectedNode : undefined ,
43
45
searchTerm : this . props . searchable ? 'fruit' : undefined ,
44
46
} ;
You can’t perform that action at this time.
0 commit comments