Skip to content

Commit

Permalink
Fix #7504: TreeTable update docs example data (#7572)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 6, 2025
1 parent 1f0e936 commit 262bdf3
Show file tree
Hide file tree
Showing 21 changed files with 987 additions and 252 deletions.
59 changes: 47 additions & 12 deletions components/doc/treetable/basicdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,61 @@ export default function BasicDemo() {
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
data: {
name: 'Applications',
size: '100kb',
type: 'Folder'
},
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
data: {
name: 'React',
size: '25kb',
type: 'Folder'
},
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-0-0',
data: {
name: 'react.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-1',
data: {
name: 'native.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-2',
data: {
name: 'mobile.app',
size: '5kb',
type: 'Application'
}
}
]
},
{
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' }]
data: {
name: 'editor.app',
size: '25kb',
type: 'Application'
}
},
{
key: '0-2',
data: {
name: 'settings.app',
size: '50kb',
type: 'Application'
}
}
]
},
Expand Down
59 changes: 47 additions & 12 deletions components/doc/treetable/columntoggledoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,61 @@ export default function ColumnToggleDemo() {
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
data: {
name: 'Applications',
size: '100kb',
type: 'Folder'
},
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
data: {
name: 'React',
size: '25kb',
type: 'Folder'
},
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-0-0',
data: {
name: 'react.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-1',
data: {
name: 'native.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-2',
data: {
name: 'mobile.app',
size: '5kb',
type: 'Application'
}
}
]
},
{
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' }]
data: {
name: 'editor.app',
size: '25kb',
type: 'Application'
}
},
{
key: '0-2',
data: {
name: 'settings.app',
size: '50kb',
type: 'Application'
}
}
]
},
Expand Down
59 changes: 47 additions & 12 deletions components/doc/treetable/conditionalstyledoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,61 @@ export default function ConditionalStyleDemo() {
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
data: {
name: 'Applications',
size: '100kb',
type: 'Folder'
},
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
data: {
name: 'React',
size: '25kb',
type: 'Folder'
},
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-0-0',
data: {
name: 'react.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-1',
data: {
name: 'native.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-2',
data: {
name: 'mobile.app',
size: '5kb',
type: 'Application'
}
}
]
},
{
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' }]
data: {
name: 'editor.app',
size: '25kb',
type: 'Application'
}
},
{
key: '0-2',
data: {
name: 'settings.app',
size: '50kb',
type: 'Application'
}
}
]
},
Expand Down
59 changes: 47 additions & 12 deletions components/doc/treetable/controlleddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,61 @@ export default function ControlledDemo() {
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
data: {
name: 'Applications',
size: '100kb',
type: 'Folder'
},
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
data: {
name: 'React',
size: '25kb',
type: 'Folder'
},
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-0-0',
data: {
name: 'react.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-1',
data: {
name: 'native.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-2',
data: {
name: 'mobile.app',
size: '5kb',
type: 'Application'
}
}
]
},
{
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' }]
data: {
name: 'editor.app',
size: '25kb',
type: 'Application'
}
},
{
key: '0-2',
data: {
name: 'settings.app',
size: '50kb',
type: 'Application'
}
}
]
},
Expand Down
59 changes: 47 additions & 12 deletions components/doc/treetable/dynamiccolumnsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,26 +92,61 @@ export default function DynamicColumnsDemo() {
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
data: {
name: 'Applications',
size: '100kb',
type: 'Folder'
},
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
data: {
name: 'React',
size: '25kb',
type: 'Folder'
},
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-0-0',
data: {
name: 'react.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-1',
data: {
name: 'native.app',
size: '10kb',
type: 'Application'
}
},
{
key: '0-0-2',
data: {
name: 'mobile.app',
size: '5kb',
type: 'Application'
}
}
]
},
{
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' }]
data: {
name: 'editor.app',
size: '25kb',
type: 'Application'
}
},
{
key: '0-2',
data: {
name: 'settings.app',
size: '50kb',
type: 'Application'
}
}
]
},
Expand Down
Loading

0 comments on commit 262bdf3

Please sign in to comment.