Skip to content

Commit

Permalink
stackblitz update
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Feb 26, 2024
1 parent be077eb commit cd04621
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 10 deletions.
41 changes: 36 additions & 5 deletions src/app/showcase/doc/tree/virtualscrolldoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ export class VirtualScrollDoc implements OnInit {
</div>`,

typescript: `
import { Component, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { TreeNode } from 'primeng/api';
import { NodeService } from '../../service/nodeservice';
@Component({
selector: 'tree-template-demo',
templateUrl: './tree-template-demo.html'
selector: 'tree-virtual-scroll-demo',
templateUrl: './tree-virtual-scroll-demo.html'
})
export class TreeTemplateDemo implements OnInit {
export class TreeVirtualScrollDemo implements OnInit {
loading: boolean = false;
files!: TreeNode[];
Expand All @@ -75,6 +76,36 @@ export class TreeTemplateDemo implements OnInit {
return duplicatedData;
}
}`
}`,
service: ['NodeService'],

data: `
/* NodeService */
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
children: [
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
]
},
{
key: '0-1',
label: 'Home',
data: 'Home Folder',
icon: 'pi pi-fw pi-home',
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
}
]
},
...`
};
}
41 changes: 36 additions & 5 deletions src/app/showcase/doc/tree/virtualscrolllazydoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ export class LazyVirtualScrollDoc implements OnInit {
</div>`,

typescript: `
import { Component, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { TreeNode } from 'primeng/api';
import { NodeService } from '../../service/nodeservice';
@Component({
selector: 'tree-template-demo',
templateUrl: './tree-template-demo.html'
selector: 'tree-virtual-scroll-lazy-demo',
templateUrl: './tree-virtual-scroll-lazy-demo.html'
})
export class TreeTemplateDemo implements OnInit {
export class TreeVirtualScrollLazyDemo implements OnInit {
loading: boolean = false;
files!: TreeNode[];
Expand Down Expand Up @@ -109,6 +110,36 @@ export class TreeTemplateDemo implements OnInit {
}, 200);
}
}
}`
}`,
service: ['NodeService'],

data: `
/* NodeService */
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
children: [
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
]
},
{
key: '0-1',
label: 'Home',
data: 'Home Folder',
icon: 'pi pi-fw pi-home',
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
}
]
},
...`
};
}

0 comments on commit cd04621

Please sign in to comment.