@@ -2040,8 +2040,26 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
2040
2040
{ id : "Field2" , title : "Number field" , type : CustomCollectionFieldType . number } ,
2041
2041
{ id : "Field3" , title : "URL field" , type : CustomCollectionFieldType . url } ,
2042
2042
{ id : "Field4" , title : "Boolean field" , type : CustomCollectionFieldType . boolean } ,
2043
+ {
2044
+ id : "Field5" , title : "People picker" , type : CustomCollectionFieldType . peoplepicker , required : true ,
2045
+ minimumUsers : 2 , minimumUsersMessage : "2 Users is the minimum" , maximumUsers : 3 ,
2046
+ } ,
2047
+ {
2048
+ id : "Field6" , title : "Combo Single" , type : CustomCollectionFieldType . combobox , required : true ,
2049
+ multiSelect : false , options : [ { key : "choice 1" , text : "choice 1" } , { key : "choice 2" , text : "choice 2" } , { key : "choice 3" , text : "choice 3" } ]
2050
+ } ,
2051
+ {
2052
+ id : "Field7" , title : "Combo Multi" , type : CustomCollectionFieldType . combobox ,
2053
+ allowFreeform : true , multiSelect : true , options : [ { key : "choice 1" , text : "choice 1" } , { key : "choice 2" , text : "choice 2" } , { key : "choice 3" , text : "choice 3" } ]
2054
+ } ,
2055
+
2043
2056
] }
2044
2057
value = { this . getRandomCollectionFieldData ( ) }
2058
+
2059
+ // value = {null}
2060
+ context = { this . props . context as any } //error when this is omitted and people picker is used
2061
+ usePanel = { true }
2062
+ noDataMessage = "No data is selected" //overrides the default message
2045
2063
/>
2046
2064
</ div >
2047
2065
< div id = "DashboardDiv" className = { styles . container } hidden = { ! isDashboardDivVisible } >
@@ -2635,7 +2653,15 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
2635
2653
private getRandomCollectionFieldData = ( ) => {
2636
2654
let result = [ ] ;
2637
2655
for ( let i = 1 ; i < 16 ; i ++ ) {
2638
- result . push ( { "Field1" : `String${ i } ` , "Field2" : i , "Field3" : "https://pnp.github.io/" , "Field4" : true } ) ;
2656
+ result . push ( {
2657
+ "Field1" : `String${ i } ` ,
2658
+ "Field2" : i ,
2659
+ "Field3" : "https://pnp.github.io/" ,
2660
+ "Field4" : true ,
2661
+ "Field5" : null ,
2662
+ "Field6" : { key : "choice 1" , text : "choice 1" } ,
2663
+ "Field7" : [ { key : "choice 1" , text : "choice 1" } , { key : "choice 2" , text : "choice 2" } ]
2664
+ } ) ;
2639
2665
}
2640
2666
return result ;
2641
2667
}
0 commit comments