Skip to content

Commit 545f680

Browse files
committed
v5
1 parent 30248fb commit 545f680

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 5.0.0 (2021.6.3)
2+
- restruct internal state management using `use-tree-state` hook
3+
- separate css file
4+
- interface change: `onNameClick(defaultOnClick, nodeData)` => `onNameClick({ defaultOnClick, nodeData })`

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# React Folder Tree
2-
A versatile and customizable react treeview library. It supports:
2+
A versatile and customizable react treeview library. Features:
33
✅ custom icons
44
✅ custom event handlers
55
✅ inline add, modify, and delete tree nodes
66
✅ checkbox with half check (indeterminate check)
77
✅ read-only mode
88

9-
It uses [use-tree-state]() hook internally for convenient state management.
9+
It uses [use-tree-state](https://www.npmjs.com/package/use-tree-state) hook internally for convenient state management.
1010
### Quick Preview
1111
![folder-tree-demo](/assets/folder-tree-demo.gif)
1212

@@ -216,7 +216,7 @@ const dataWithUrl = {
216216
// ...
217217
};
218218

219-
const onNameClick = (defaultOnClick, nodeData) => {
219+
const onNameClick = ({ defaultOnClick, nodeData }) => {
220220
defaultOnClick();
221221

222222
const {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
},
101101
"dependencies": {
102102
"prop-types": "^15.7.2",
103-
"react-icons": "^4.1.0"
103+
"react-icons": "^4.1.0",
104+
"use-tree-state": "^1.0.0"
104105
}
105106
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9881,6 +9881,11 @@ url@^0.11.0:
98819881
punycode "1.3.2"
98829882
querystring "0.2.0"
98839883

9884+
use-tree-state@^1.0.0:
9885+
version "1.0.0"
9886+
resolved "https://registry.yarnpkg.com/use-tree-state/-/use-tree-state-1.0.0.tgz#78e1e629b55faa33e9fef9ee409b383612ff429c"
9887+
integrity sha512-MEHuUbZWGhekkFCboH0HKOhSHe5zm/l0C+GJdg0+vAuBr42VYmCTO9P2NfQMPU3Gkj7Zys93vtpl/fGReuOi5w==
9888+
98849889
use@^3.1.0:
98859890
version "3.1.1"
98869891
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"

0 commit comments

Comments
 (0)