@@ -39,7 +39,7 @@ import { GridLayout } from '../../../GridLayout';
39
39
import { ComboBoxListItemPicker } from '../../../' ;
40
40
import { TreeView , ITreeItem , TreeItemActionsDisplayMode , TreeViewSelectionMode } from '../../../controls/treeView' ;
41
41
import { IIconProps } from 'office-ui-fabric-react/lib/Icon' ;
42
- import { IconPicker } from '../../../controls/iconPicker' ;
42
+ import { IconPicker } from '../../../controls/iconPicker' ;
43
43
import { ISize } from 'office-ui-fabric-react/lib/Utilities' ;
44
44
45
45
// Used to render document cards
@@ -116,6 +116,98 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
116
116
< div id = "5" key = "5" > Donec orci lorem, imperdiet eu nisi sit amet, condimentum scelerisque tortor. Etiam nec lacinia dui. Duis non turpis neque. Sed pellentesque a erat et accumsan. Pellentesque elit odio, elementum nec placerat nec, ornare in tortor. Suspendisse gravida magna maximus mollis facilisis. Duis odio libero, finibus ac suscipit sed, aliquam et diam. Aenean posuere lacus ex. Donec dapibus, sem ac luctus ultrices, justo libero tempor eros, vitae lacinia ex ante non dolor. Curabitur condimentum, ligula id pharetra dictum, libero libero ullamcorper nunc, eu blandit sem arcu ut felis. Nullam lacinia dapibus auctor.</ div >
117
117
] ;
118
118
119
+ private skypeCheckIcon : IIconProps = { iconName : 'SkypeCheck' } ;
120
+ private treeitems = [
121
+ {
122
+ key : "R1" ,
123
+ label : "Root" ,
124
+ subLabel : "This is a sub label for node" ,
125
+ iconProps : this . skypeCheckIcon ,
126
+ actions : [ {
127
+ title : "Get item" ,
128
+ iconProps : {
129
+ iconName : 'Warning' ,
130
+ style : {
131
+ color : 'salmon' ,
132
+ } ,
133
+ } ,
134
+ id : "GetItem" ,
135
+ actionCallback : async ( treeItem : ITreeItem ) => {
136
+ console . log ( treeItem ) ;
137
+ }
138
+ } ] ,
139
+ children : [
140
+ {
141
+ key : "1" ,
142
+ label : "Parent 1" ,
143
+ selectable : false ,
144
+ children : [
145
+ {
146
+ key : "3" ,
147
+ label : "Child 1" ,
148
+ subLabel : "This is a sub label for node" ,
149
+ actions : [ {
150
+ title : "Share" ,
151
+ iconProps : {
152
+ iconName : 'Share'
153
+ } ,
154
+ id : "GetItem" ,
155
+ actionCallback : async ( treeItem : ITreeItem ) => {
156
+ console . log ( treeItem ) ;
157
+ }
158
+ } ] ,
159
+ children : [
160
+ {
161
+ key : "gc1" ,
162
+ label : "Grand Child 1" ,
163
+ actions : [ {
164
+ title : "Get Grand Child item" ,
165
+ iconProps : {
166
+ iconName : 'Mail'
167
+ } ,
168
+ id : "GetItem" ,
169
+ actionCallback : async ( treeItem : ITreeItem ) => {
170
+ console . log ( treeItem ) ;
171
+ }
172
+ } ]
173
+ }
174
+ ]
175
+ } ,
176
+ {
177
+ key : "4" ,
178
+ label : "Child 2" ,
179
+ iconProps : this . skypeCheckIcon
180
+ }
181
+ ]
182
+ } ,
183
+ {
184
+ key : "2" ,
185
+ label : "Parent 2"
186
+ } ,
187
+ {
188
+ key : "5" ,
189
+ label : "Parent 3" ,
190
+ disabled : true
191
+ } ,
192
+ {
193
+ key : "6" ,
194
+ label : "Parent 4" ,
195
+ selectable : true
196
+ }
197
+ ]
198
+ } ,
199
+ {
200
+ key : "R2" ,
201
+ label : "Root 2" ,
202
+ children : [
203
+ {
204
+ key : "8" ,
205
+ label : "Parent 5"
206
+ }
207
+ ]
208
+ }
209
+ ] ;
210
+
119
211
constructor ( props : IControlsTestProps ) {
120
212
super ( props ) ;
121
213
@@ -716,8 +808,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
716
808
onSelectedItem = { this . listItemPickerDataSelected } />
717
809
718
810
</ div >
719
- < div > Icon Picker</ div >
720
- < div > < IconPicker onSave = { ( value ) => { console . log ( value ) } } buttonLabel = "Icon Picker" > </ IconPicker > </ div >
811
+ < div > Icon Picker</ div >
812
+ < div > < IconPicker onSave = { ( value ) => { console . log ( value ) ; } } buttonLabel = "Icon Picker" > </ IconPicker > </ div >
721
813
722
814
< div className = "ms-font-m" > ComboBoxListItemPicker:
723
815
@@ -955,21 +1047,21 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
955
1047
defaultSelectedKeys = { [ 'R2' , '6' ] }
956
1048
onExpandCollapse = { this . onExpandCollapseTree }
957
1049
onSelect = { this . onItemSelected }
958
- // onRenderItem={this.renderCustomTreeItem}
959
- />
960
-
1050
+ // onRenderItem={this.renderCustomTreeItem}
1051
+ />
1052
+
961
1053
</ div >
962
1054
963
- < div >
964
- < Pagination
965
- currentPage = { 3 }
966
- onChange = { ( page ) => ( this . _getPage ( page ) ) }
967
- totalPages = { 13 }
968
- //limiter={3}
969
- // hideFirstPageJump
970
- //hideLastPageJump
971
- //limiterIcon={"NumberedListText"}
972
- />
1055
+ < div >
1056
+ < Pagination
1057
+ currentPage = { 3 }
1058
+ onChange = { ( page ) => ( this . _getPage ( page ) ) }
1059
+ totalPages = { 13 }
1060
+ //limiter={3}
1061
+ // hideFirstPageJump
1062
+ //hideLastPageJump
1063
+ //limiterIcon={"NumberedListText"}
1064
+ />
973
1065
</ div >
974
1066
</ div >
975
1067
) ;
@@ -982,14 +1074,6 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
982
1074
private onItemSelected ( items : ITreeItem [ ] ) {
983
1075
console . log ( "items selected: " + items . length ) ;
984
1076
}
985
-
986
- private _getPage ( page : number ) {
987
- console . log ( 'Page:' , page ) ;
988
- }
989
-
990
- private _onFolderSelect = ( folder : IFolder ) : void => {
991
- console . log ( 'selected folder' , folder ) ;
992
- }
993
1077
994
1078
private renderCustomTreeItem ( item : ITreeItem ) : JSX . Element {
995
1079
return (
@@ -1003,97 +1087,9 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
1003
1087
) ;
1004
1088
}
1005
1089
1006
- private skypeCheckIcon : IIconProps = { iconName : 'SkypeCheck' } ;
1007
- private treeitems = [
1008
- {
1009
- key : "R1" ,
1010
- label : "Root" ,
1011
- subLabel : "This is a sub label for node" ,
1012
- iconProps : this . skypeCheckIcon ,
1013
- actions : [ {
1014
- title : "Get item" ,
1015
- iconProps : {
1016
- iconName : 'Warning' ,
1017
- style : {
1018
- color : 'salmon' ,
1019
- } ,
1020
- } ,
1021
- id : "GetItem" ,
1022
- actionCallback : async ( treeItem : ITreeItem ) => {
1023
- console . log ( treeItem ) ;
1024
- }
1025
- } ] ,
1026
- children : [
1027
- {
1028
- key : "1" ,
1029
- label : "Parent 1" ,
1030
- selectable : false ,
1031
- children : [
1032
- {
1033
- key : "3" ,
1034
- label : "Child 1" ,
1035
- subLabel : "This is a sub label for node" ,
1036
- actions : [ {
1037
- title : "Share" ,
1038
- iconProps : {
1039
- iconName : 'Share'
1040
- } ,
1041
- id : "GetItem" ,
1042
- actionCallback : async ( treeItem : ITreeItem ) => {
1043
- console . log ( treeItem ) ;
1044
- }
1045
- } ] ,
1046
- children : [
1047
- {
1048
- key : "gc1" ,
1049
- label : "Grand Child 1" ,
1050
- actions : [ {
1051
- title : "Get Grand Child item" ,
1052
- iconProps : {
1053
- iconName : 'Mail'
1054
- } ,
1055
- id : "GetItem" ,
1056
- actionCallback : async ( treeItem : ITreeItem ) => {
1057
- console . log ( treeItem ) ;
1058
- }
1059
- } ]
1060
- }
1061
- ]
1062
- } ,
1063
- {
1064
- key : "4" ,
1065
- label : "Child 2" ,
1066
- iconProps : this . skypeCheckIcon
1067
- }
1068
- ]
1069
- } ,
1070
- {
1071
- key : "2" ,
1072
- label : "Parent 2"
1073
- } ,
1074
- {
1075
- key : "5" ,
1076
- label : "Parent 3" ,
1077
- disabled : true
1078
- } ,
1079
- {
1080
- key : "6" ,
1081
- label : "Parent 4" ,
1082
- selectable : true
1083
- }
1084
- ]
1085
- } ,
1086
- {
1087
- key : "R2" ,
1088
- label : "Root 2" ,
1089
- children : [
1090
- {
1091
- key : "8" ,
1092
- label : "Parent 5"
1093
- }
1094
- ]
1095
- }
1096
- ] ;
1090
+ private _getPage ( page : number ) {
1091
+ console . log ( 'Page:' , page ) ;
1092
+ }
1097
1093
1098
1094
private _onFolderSelect = ( folder : IFolder ) : void => {
1099
1095
console . log ( 'selected folder' , folder ) ;
0 commit comments