
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
flexi-treeview
Advanced tools
A lightweight, customizable Angular component for displaying hierarchical data in a tree structure.
Flexi Treeview is a customizable and flexible Angular component for displaying hierarchical data in a tree structure. It supports selection, expansion, search, and actions like edit, delete, and refresh.
npm install flexi-treeview
import { FlexiTreeviewComponent } from 'flexi-treeview';
@Component({
selector: 'app-root',
imports: [FlexiTreeviewComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
<flexi-treeview
[data]="treeData"
[treeviewTitle]="'Categories'"
[themeClass]="'light'"
[showCheckbox]="true"
[showSearch]="true"
[showDetailButton]="true"
(onSelected)="handleSelectedNodes($event)"
(onEdit)="handleEditNode($event)"
(onDelete)="handleDeleteNode($event)"
(onRefresh)="handleRefresh()"
detailRouterLink="/products">
</flexi-treeview>
treeData: FlexiTreeNode[] = [
{
id: '1',
name: 'Parent Node',
code: 'P1',
isMain: true,
indeterminate: false,
selected: false,
expanded: true,
description: '',
originalData: null,
children: [
{
id: '2',
name: 'Child Node 1',
code: 'C1',
isMain: false,
indeterminate: false,
selected: false,
expanded: true,
description: '',
originalData: null
},
{
id: '3',
name: 'Child Node 2',
code: 'C2',
isMain: false,
indeterminate: false,
selected: false,
expanded: true,
description: '',
originalData: null
}
]
}
];
handleSelectedNodes(selectedNodes: FlexiTreeNode[]) {
console.log('Selected Nodes:', selectedNodes);
}
handleEditNode(node: FlexiTreeNode) {
console.log('Edit Node:', node);
}
handleDeleteNode(node: FlexiTreeNode) {
console.log('Delete Node:', node);
}
handleRefresh() {
console.log('Treeview refreshed');
}
Input Property | Type | Default | Description |
---|---|---|---|
data | FlexiTreeNode[] | [] | The tree node data array. |
treeviewTitle | string | '' | Title of the treeview. |
showCheckbox | boolean | false | Show checkboxes for node selection. |
showEditButton | boolean | true | Show the edit button for each node. |
showDeleteButton | boolean | true | Show the delete button for each node. |
showDetailButton | boolean | false | Show the detail button for each node. |
showSearch | boolean | true | Enable search functionality. |
showActions | boolean | true | Show action buttons for nodes. |
width | string | '100%' | Width of the treeview component. |
height | string | '100%' | Height of the treeview component. |
fontSize | string | '13px' | Font size of tree nodes. |
btnSize | FlexiButtonSizeType | 'small' | Size of action buttons. |
checkboxSize | string | '1.4em' | Size of checkboxes. |
actionBtnPosition | `'left' | 'right'` | 'right' |
themeClass | `'light' | 'dark'` | 'light' |
loading | boolean | false | Show loading indicator. |
expend | boolean | true | Expand all nodes initially. |
detailRouterLink | string | '' | Router link for detail view. |
language | `'en' | 'tr'` | 'en' |
Event | Output Type | Description |
---|---|---|
onSelected | FlexiTreeNode[] | Emits when nodes are selected. |
onEdit | FlexiTreeNode | Emits when a node is edited. |
onDelete | FlexiTreeNode | Emits when a node is deleted. |
onRefresh | void | Emits when the refresh button is clicked. |
MIT License.
FAQs
A lightweight, customizable Angular component for displaying hierarchical data in a tree structure.
The npm package flexi-treeview receives a total of 5 weekly downloads. As such, flexi-treeview popularity was classified as not popular.
We found that flexi-treeview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.