frontend-collective / frontend-collective/react-sortable-tree
loading the child asynchronously from server
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
@fritz-c thanks for the very great component. We want to know how we can load the children's child asynchronously when the `expand` button is clicked.
Initially, we want to send the UI just the first depth and as the user clicks on the expansion button we want to pull more data.
We sending column `hasChildren` boolean for a placeholder for asynchronous data. So when the expansion is clicked it will pull additional node data from the backend.
Let me know what I need to tweak to get there.
```
treeData: [
{
"title": "development",
"isDirectory": true,
"hasChildren": true,
"children": [
{
"title": "examples",
"isDirectory": true,
"hasChildren": true,
},
{
"title": "private",
"isDirectory": true,
"hasChildren": true,
},
{
"title": "projects",
"isDirectory": true,
"hasChildren": true,
}
]
}
],
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.