
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-pretty-treeview
Advanced tools

npm i --save react-pretty-treeview
| Update | version | date |
|---|---|---|
| Can customize style in component | 1.0.18 | 16 May 2018 |
| Can use element class for customize style | 1.0.21 | 17 May 2018 |
| Fixed bugs style | 1.0.23 | 18 May 2018 |
| Add custom style | 1.0.24 | 18 May 2018 |
| Clean file | 1.0.25 | 19 May 2018 |
| Add .npmignore | 1.0.26 | 19 May 2018 |
| Props | Type | Required | default | Description |
|---|---|---|---|---|
| childName | String | none | childs | - |
| labelName | String | none | name | - |
| labelStyle | String | none | - | - |
| treeStyle | String | none | - | - |
| activeName | String | none | - | - |
| data | Array or Object if use immutable ( fromJS ) | yes | - | - |
| onSelected | Function , Response (childObject, rootIndex, selectedName, dataList, rootKeyName, rootKey) => console.log(childObject, rootIndex, selectedName, dataList, rootKeyName, rootKey) | yes | - | - |
import TreeView from 'react-pretty-treeview';
<TreeView
labelStyle=''
treeStyle=''
activeName='revlon-lipstick'
data={[
{
name: 'revlon test',
description: '',
status: 'disable',
open: true,
itemSize: 5,
createdDate: 1522846151,
updatedDate: 1522897770,
childs: []
}
]}
onSelected={ action('onSelected')}
/>
//style for treeview node
span.tree-view-node:first-child:before{
content: '';
width: 1px;
height: 100%;
position: absolute;
left: -15px;
top: 0px;
background-color: #ddd;
}
span.tree-view-node:last-child:before{
content: '';
width: 1px;
height: 0%;
position: absolute;
left: -15px;
top: 0px;
background-color: #ddd;
}
span.tree-view-node span{
padding-top: 10px;
margin-left: 30px;
position: relative;
list-style: none;
display: block;
}
//style for treeview label
.tree-view-label{
cursor: pointer;
padding: 5px 15px;
display: inline-block;
position: relative;
background-color: #eee;
}
.tree-view-label:hover{
background: rgba(0,0,0,0.05);
}
.tree-view-label:before{
content: '';
width: 1px;
height: 82%;
position: absolute;
left: -15px;
top: -10px;
background-color: #ddd;
}
.tree-view-label:after{
content: '';
width: 15px;
height: 1px;
position: absolute;
left: -15px;
top: 50%;
background-color: #ddd;
}
.tree-view-label.active{
background-color: #ddd;
color: #333;
}
.tree-view-label.active:hover{
background: #eee;
}
FAQs
React Tree View
The npm package react-pretty-treeview receives a total of 76 weekly downloads. As such, react-pretty-treeview popularity was classified as not popular.
We found that react-pretty-treeview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.