Skip to content

Commit 581ac01

Browse files
Modified Sample items for Treeview to Test ehnacement #559
Modified Sample items for Treeview to Test ehnacement #559
1 parent c29699b commit 581ac01

File tree

1 file changed

+44
-136
lines changed

1 file changed

+44
-136
lines changed

src/webparts/controlsTest/components/ControlsTest.tsx

Lines changed: 44 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,47 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
204204
{
205205
key: "8",
206206
label: "Parent 5"
207+
},
208+
{
209+
key: "9",
210+
label: "Parent 6"
211+
212+
},
213+
{
214+
key: "10",
215+
label: "Parent 7"
216+
},
217+
{
218+
key: "11",
219+
label: "Parent 8"
220+
}
221+
]
222+
},
223+
{
224+
key: "R3",
225+
label: "Root 3",
226+
children: [
227+
{
228+
key: "12",
229+
label: "Parent 9"
230+
},
231+
{
232+
key: "13",
233+
label: "Parent 10",
234+
children: [
235+
{
236+
key: "gc3",
237+
label: "Child of Parent 10"
238+
},
239+
]
240+
},
241+
{
242+
key: "14",
243+
label: "Parent 11"
244+
},
245+
{
246+
key: "15",
247+
label: "Parent 12"
207248
}
208249
]
209250
}
@@ -1115,142 +1156,9 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
11151156
);
11161157
}
11171158

1118-
private skypeCheckIcon: IIconProps = { iconName: 'SkypeCheck' };
1119-
private treeitems = [
1120-
{
1121-
key: "R1",
1122-
label: "Root",
1123-
subLabel: "This is a sub label for node",
1124-
iconProps: this.skypeCheckIcon,
1125-
actions: [{
1126-
title: "Get item",
1127-
iconProps: {
1128-
iconName: 'Warning',
1129-
style: {
1130-
color: 'salmon',
1131-
},
1132-
},
1133-
id: "GetItem",
1134-
actionCallback: async (treeItem: ITreeItem) => {
1135-
console.log(treeItem);
1136-
}
1137-
}],
1138-
children: [
1139-
{
1140-
key: "1",
1141-
label: "Parent 1",
1142-
selectable: false,
1143-
children: [
1144-
{
1145-
key: "3",
1146-
label: "Child 1",
1147-
subLabel: "This is a sub label for node",
1148-
actions: [{
1149-
title: "Share",
1150-
iconProps: {
1151-
iconName: 'Share'
1152-
},
1153-
id: "GetItem",
1154-
actionCallback: async (treeItem: ITreeItem) => {
1155-
console.log(treeItem);
1156-
}
1157-
}],
1158-
children: [
1159-
{
1160-
key: "gc1",
1161-
label: "Grand Child 1",
1162-
actions: [{
1163-
title: "Get Grand Child item",
1164-
iconProps: {
1165-
iconName: 'Mail'
1166-
},
1167-
id: "GetItem",
1168-
actionCallback: async (treeItem: ITreeItem) => {
1169-
console.log(treeItem);
1170-
}
1171-
}]
1172-
}
1173-
]
1174-
},
1175-
{
1176-
key: "4",
1177-
label: "Child 2",
1178-
iconProps: this.skypeCheckIcon
1179-
}
1180-
]
1181-
},
1182-
{
1183-
key: "2",
1184-
label: "Parent 2"
1185-
},
1186-
{
1187-
key: "5",
1188-
label: "Parent 3",
1189-
disabled: true
1190-
},
1191-
{
1192-
key: "6",
1193-
label: "Parent 4",
1194-
selectable: true
1195-
}
1196-
]
1197-
},
1198-
{
1199-
key: "R2",
1200-
label: "Root 2",
1201-
children: [
1202-
{
1203-
key: "8",
1204-
label: "Parent 5"
1205-
},
1206-
{
1207-
key: "9",
1208-
label: "Parent 6",
1209-
children: [
1210-
{
1211-
key: "granchild",
1212-
label: "Child of Parent 6"
1213-
},
1214-
]
1215-
},
1216-
{
1217-
key: "10",
1218-
label: "Parent 7"
1219-
},
1220-
{
1221-
key: "11",
1222-
label: "Parent 8"
1223-
}
1224-
]
1225-
},
1226-
{
1227-
key: "R3",
1228-
label: "Root 3",
1229-
children: [
1230-
{
1231-
key: "12",
1232-
label: "Parent 9"
1233-
},
1234-
{
1235-
key: "13",
1236-
label: "Parent 10"
1237-
},
1238-
{
1239-
key: "14",
1240-
label: "Parent 11",
1241-
children: [
1242-
{
1243-
key: "gc3",
1244-
label: "Grand Child 2"
1245-
}]
1246-
},
1247-
{
1248-
key: "15",
1249-
label: "Parent 12"
1250-
}
1251-
]
1252-
}
1253-
];
1159+
private _getPage(page: number){
1160+
console.log('Page:', page);
1161+
}
12541162

12551163
// private _onFolderSelect = (folder: IFolder): void => {
12561164
// console.log('selected folder', folder);

0 commit comments

Comments
 (0)