Kind: Class
Source: Frontend/src/app/components/files/recursive-tree-folder/recursive-tree-folder.component.ts (line 14)
Part of: Frontend
RecursiveTreeFolderComponent represents a folder node in the file tree UI. It initializes folder state, handles folder click and expansion events, and participates in rendering nested folder components for recursive tree structures.
Implements: OnInit
Methods
| Method | Signature | Returns |
|---|---|---|
ngOnInit | ngOnInit() | void |
folderClickedHandler | folderClickedHandler(data: DataEmitted) | void |
folderExpendedHandler | folderExpendedHandler(folder: OneDriveFilesList, levelIndex: number) | void |
onInitialized | onInitialized(e: undefined) | void |
Properties
| Property | Type |
|---|---|
folderItems | OneDriveFilesList[] |
levelIndex | number |
folderClicked | any |
folderExpanded | any |
selectedFolderId | string |
subscription | Subscription |
updateTopContent | any |
updateBottomContent | any |
updateContentTimer | any |
updateContent | any |
Diagram
mermaidgraph LR Tree[File Tree] --> Folder[RecursiveTreeFolderComponent] Folder --> Init[ngOnInit] Init --> Initialized[onInitialized] User[User Interaction] --> Click[folderClickedHandler] User --> Expand[folderExpendedHandler] Click --> Folder Expand --> Children[Nested Folder Components]
Usage
tsimport { RecursiveTreeFolderComponent } from './recursive-tree-folder.component';
function handleFolderInteraction(
folder: RecursiveTreeFolderComponent,
action: 'click' | 'expand',
): void {
if (action === 'click') {
folder.folderClickedHandler();
return;
}
folder.folderExpendedHandler();
}
// The component lifecycle calls these methods during initialization.
function initializeFolder(folder: RecursiveTreeFolderComponent): void {
folder.ngOnInit();
folder.onInitialized();
}
AI Coding Instructions
- Keep folder selection logic in
folderClickedHandler()and folder expansion logic infolderExpendedHandler(). - Preserve the recursive relationship when changing folder rendering so nested folders continue to use
RecursiveTreeFolderComponent. - Do not rename
folderExpendedHandler()without updating every template event binding and caller. - Keep initialization work coordinated between
ngOnInit()andonInitialized()so folder state is ready before child folders render.
Used by
1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (1)
TranslateHandler—Frontend/src/app/components/shared/shared.module.ts:1
Was this page helpful?