Skip to content

Commit 4c5ad3c

Browse files
author
Fabian Nickel
committed
implement node id
1 parent 153b6f3 commit 4c5ad3c

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/components/MuiTreeView/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ const tree = [
1313
{
1414
value: 'Parent C',
1515
nodes: [
16-
<<<<<<< 38b10b1adb4f781cd5e42ff44669bec17f97d819
1716
{ value: 'Child D', id: 'example-id' },
18-
=======
19-
{ value: 'Child D', id: 'test' },
20-
>>>>>>> highlight
2117
{ value: 'Child E' },
2218
{ value: 'Child F' },
2319
],

src/components/MuiTreeView/index.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ const styles = theme => ({
6363
maxWidth: '75vw',
6464
},
6565
expandIcon: {},
66-
highlightItem: {
67-
backgroundColor: 'rgb(138, 138, 138)',
68-
},
6966
});
7067

7168
/**
@@ -85,8 +82,6 @@ class MuiTreeView extends Component {
8582
expansionPanelDetailsProps: object,
8683
/** Properties applied to the ListItem element. */
8784
listItemProps: object,
88-
/** Id of a leaf which will be highlighted by adding the class */
89-
highlightId: oneOfType[(string, number)],
9085
};
9186

9287
static defaultProps = {
@@ -95,7 +90,6 @@ class MuiTreeView extends Component {
9590
expansionPanelSummaryProps: null,
9691
expansionPanelDetailsProps: null,
9792
listItemProps: null,
98-
highlightId: null,
9993
};
10094

10195
createFilteredTree = memoize(
@@ -123,7 +117,6 @@ class MuiTreeView extends Component {
123117
expansionPanelSummaryProps,
124118
expansionPanelDetailsProps,
125119
listItemProps,
126-
highlightId,
127120
...props
128121
} = this.props;
129122
const value = this.getNodeValue(node);
@@ -147,7 +140,6 @@ class MuiTreeView extends Component {
147140
value={value}
148141
onClick={() => this.handleLeafClick({ value, parent, id })}
149142
button
150-
classes={highlightId === id ? { root: classes.highlightItem } : {}}
151143
{...listItemProps}>
152144
<div className={classes.text}>{value}</div>
153145
</ListItem>

0 commit comments

Comments
 (0)