@@ -2040,8 +2040,26 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
20402040 { id : "Field2" , title : "Number field" , type : CustomCollectionFieldType . number } ,
20412041 { id : "Field3" , title : "URL field" , type : CustomCollectionFieldType . url } ,
20422042 { 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+
20432056 ] }
20442057 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
20452063 />
20462064 </ div >
20472065 < div id = "DashboardDiv" className = { styles . container } hidden = { ! isDashboardDivVisible } >
@@ -2635,7 +2653,15 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
26352653 private getRandomCollectionFieldData = ( ) => {
26362654 let result = [ ] ;
26372655 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+ } ) ;
26392665 }
26402666 return result ;
26412667 }
0 commit comments