Skip to content

Commit 4fa1382

Browse files
committed
Update peerDependencies: infinite-tree>=1.1.0
1 parent c83e945 commit 4fa1382

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

src/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ module.exports = class extends React.Component {
1111
tree = null;
1212

1313
eventHandlers = {
14-
onUpdate: null,
14+
onContentWillUpdate: null,
15+
onContentDidUpdate: null,
1516
onOpenNode: null,
1617
onCloseNode: null,
17-
onSelectNode: null,
18-
onDropNode: null,
19-
onScrollProgress: null
18+
onSelectNode: null
2019
};
2120

2221
componentDidMount() {
@@ -32,7 +31,7 @@ module.exports = class extends React.Component {
3231
return;
3332
}
3433

35-
const eventName = lcfirst(key.substr(2)); // e.g. onUpdate -> update
34+
const eventName = lcfirst(key.substr(2)); // e.g. onContentWillUpdate -> contentWillUpdate
3635
this.eventHandlers[key] = this.props[key];
3736
this.tree.on(eventName, this.eventHandlers[key]);
3837
});

src/index.styl

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,42 @@
11
@import 'nib'
22

3-
/* Change the max-height to suit your needs. */
4-
.infinite-tree-content {
5-
max-height: 400px;
6-
}
73
.infinite-tree {
84
}
95
.infinite-tree-scroll {
106
overflow: auto;
7+
max-height: 400px; /* Change the height to suit your needs. */
8+
}
9+
.infinite-tree-table {
10+
width: 100%;
1111
}
1212
.infinite-tree-content {
1313
// Outline removes default browser's borders for focused element.
1414
outline: 0;
1515

16-
.tree-selected.tree-item,
17-
.tree-selected.tree-item:hover {
16+
.infinite-tree-selected.infinite-tree-item,
17+
.infinite-tree-selected.infinite-tree-item:hover {
1818
background: #deecfd;
1919
border: 1px solid #0066cc;
2020
}
21-
.tree-item {
21+
.infinite-tree-item {
2222
border: 1px solid transparent;
2323
cursor: default;
2424
}
25-
.tree-item:hover {
25+
.infinite-tree-item:hover {
2626
background: #f2fdff;
2727
}
28-
.tree-item.highlight {
29-
border: 1px dotted #ccc;
30-
background-color: #f5f6f7;
31-
}
32-
.tree-node {
28+
.infinite-tree-node {
3329
position: relative;
3430
}
35-
.tree-toggler {
31+
.infinite-tree-toggler {
3632
color: #666;
3733
user-select: none;
3834
}
39-
.tree-toggler:hover {
35+
.infinite-tree-toggler:hover {
4036
color: #333;
4137
text-decoration: none;
4238
}
43-
.tree-title {
39+
.infinite-tree-title {
4440
cursor: pointer;
4541
user-select: none;
4642
}

0 commit comments

Comments
 (0)