@@ -501,9 +501,9 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
501
501
selectedTeamChannels : [ ] ,
502
502
errorMessage : "This field is required" ,
503
503
selectedFilters : [ "filter1" ] ,
504
- termStoreInfo : null ,
505
- termSetInfo : null ,
506
- testTerms : [ ] ,
504
+ termStoreInfo : null ,
505
+ termSetInfo : null ,
506
+ testTerms : [ ] ,
507
507
} ;
508
508
509
509
this . _onIconSizeChange = this . _onIconSizeChange . bind ( this ) ;
@@ -518,13 +518,13 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
518
518
public async componentDidMount ( ) {
519
519
const restApi = `${ this . props . context . pageContext . web . absoluteUrl } /_api/web/GetFolderByServerRelativeUrl('Shared%20Documents')/files?$expand=ListItemAllFields` ;
520
520
const response = await this . props . context . spHttpClient . get ( restApi , SPHttpClient . configurations . v1 ) ;
521
- const items = await response . json ( ) ;
521
+ const items = await response . json ( ) ;
522
522
523
- this . setState ( {
524
- items : items . value ? items . value : [ ] ,
525
- termStoreInfo : await this . spTaxonomyService . getTermStoreInfo ( ) ,
526
- termSetInfo : await this . spTaxonomyService . getTermSetInfo ( Guid . parse ( "4bc86596-7caf-4e70-80c9-d9769e448988" ) ) ,
527
- } ) ;
523
+ this . setState ( {
524
+ items : items . value ? items . value : [ ] ,
525
+ termStoreInfo : await this . spTaxonomyService . getTermStoreInfo ( ) ,
526
+ termSetInfo : await this . spTaxonomyService . getTermSetInfo ( Guid . parse ( "4bc86596-7caf-4e70-80c9-d9769e448988" ) ) ,
527
+ } ) ;
528
528
529
529
// // Get Authors in the SharePoint Document library -- For People Picker Testing
530
530
// const restAuthorApi = `${this.props.context.pageContext.web.absoluteUrl}/_api/web/lists/GetByTitle('Documents')/Items?$select=Id, Author/EMail&$expand=Author/EMail`;
@@ -728,12 +728,13 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
728
728
}
729
729
730
730
private toggleToolbarFilter = ( filterId : string ) => {
731
- this . setState ( ( { selectedFilters} ) => {
732
- if ( selectedFilters . includes ( filterId ) ) {
733
- return { selectedFilters : selectedFilters . filter ( f => f !== filterId ) } ;
734
- } else {
735
- return { selectedFilters : [ ...selectedFilters , filterId ] } ;
736
- } } ) ;
731
+ this . setState ( ( { selectedFilters } ) => {
732
+ if ( selectedFilters . includes ( filterId ) ) {
733
+ return { selectedFilters : selectedFilters . filter ( f => f !== filterId ) } ;
734
+ } else {
735
+ return { selectedFilters : [ ...selectedFilters , filterId ] } ;
736
+ }
737
+ } ) ;
737
738
}
738
739
739
740
private rootFolder : IFolder = {
@@ -1937,12 +1938,12 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
1937
1938
}
1938
1939
}
1939
1940
} }
1940
- filters = { toolbarFilters }
1941
- onSelectedFiltersChange = { this . onToolbarSelectedFiltersChange }
1941
+ filters = { toolbarFilters }
1942
+ onSelectedFiltersChange = { this . onToolbarSelectedFiltersChange }
1942
1943
/>
1943
1944
1944
1945
< div >
1945
- < h3 > Controlled toolbar</ h3 >
1946
+ < h3 > Controlled toolbar</ h3 >
1946
1947
< Toolbar actionGroups = { {
1947
1948
'group1' : {
1948
1949
'action1' : {
@@ -1955,7 +1956,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
1955
1956
iconName : 'Add' ,
1956
1957
onClick : ( ) => { console . log ( 'New action click' ) ; }
1957
1958
}
1958
- } } }
1959
+ }
1960
+ } }
1959
1961
filters = { toolbarFilters }
1960
1962
selectedFilterIds = { this . state . selectedFilters }
1961
1963
onSelectedFiltersChange = { this . onToolbarSelectedFiltersChange } />
@@ -2345,7 +2347,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
2345
2347
< AdaptiveCardDesignerHost
2346
2348
headerText = { `Adaptive Card Designer` }
2347
2349
buttonText = "Open Designer"
2348
- card = { { "$schema" :"http://adaptivecards.io/schemas/adaptive-card.json" , "type" :"AdaptiveCard" , "version" :"1.5" , "body" :[ { "type" :"ColumnSet" , "columns" :[ { "width" :"auto" , "items" :[ { "type" :"Image" , "size" :"Small" , "style" :"Person" , "url" :"/_layouts/15/userphoto.aspx?size=M&username=${$root['@context']['userInfo']['email']}" } ] , "type" :"Column" } , { "width" :"stretch" , "items" :[ { "type" :"TextBlock" , "text" :"${$root['@context']['userInfo']['displayName']}" , "weight" :"Bolder" } , { "type" :"TextBlock" , "spacing" :"None" , "text" :"${$root['@context']['userInfo']['email']}" } ] , "type" :"Column" } ] } ] } }
2350
+ card = { { "$schema" : "http://adaptivecards.io/schemas/adaptive-card.json" , "type" : "AdaptiveCard" , "version" : "1.5" , "body" : [ { "type" : "ColumnSet" , "columns" : [ { "width" : "auto" , "items" : [ { "type" : "Image" , "size" : "Small" , "style" : "Person" , "url" : "/_layouts/15/userphoto.aspx?size=M&username=${$root['@context']['userInfo']['email']}" } ] , "type" : "Column" } , { "width" : "stretch" , "items" : [ { "type" : "TextBlock" , "text" : "${$root['@context']['userInfo']['displayName']}" , "weight" : "Bolder" } , { "type" : "TextBlock" , "spacing" : "None" , "text" : "${$root['@context']['userInfo']['email']}" } ] , "type" : "Column" } ] } ] } }
2349
2351
data = { undefined }
2350
2352
context = { this . props . context }
2351
2353
theme = { this . props . themeVariant }
@@ -2388,22 +2390,22 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
2388
2390
/>
2389
2391
</ div >
2390
2392
2391
- < div >
2393
+ < div >
2392
2394
< h3 > Modern Taxonomy Tree</ h3 >
2393
- { this . state . termStoreInfo && (
2394
- < TaxonomyTree
2395
- languageTag = { this . state . termStoreInfo . defaultLanguageTag }
2396
- onLoadMoreData = { this . spTaxonomyService . getTerms }
2397
- pageSize = { 50 }
2398
- setTerms = { ( value ) => this . setState ( { testTerms : value as any } ) }
2399
- termStoreInfo = { this . state . termStoreInfo }
2400
- termSetInfo = { this . state . termSetInfo }
2401
- terms = { this . state . testTerms as any [ ] }
2402
- onRenderActionButton = { ( ) => < button > test button</ button > }
2403
- hideDeprecatedTerms = { false }
2404
- showIcons = { true }
2405
- />
2406
- ) }
2395
+ { this . state . termStoreInfo && (
2396
+ < TaxonomyTree
2397
+ languageTag = { this . state . termStoreInfo . defaultLanguageTag }
2398
+ onLoadMoreData = { this . spTaxonomyService . getTerms }
2399
+ pageSize = { 50 }
2400
+ setTerms = { ( value ) => this . setState ( { testTerms : value as any } ) }
2401
+ termStoreInfo = { this . state . termStoreInfo }
2402
+ termSetInfo = { this . state . termSetInfo }
2403
+ terms = { this . state . testTerms as any [ ] }
2404
+ onRenderActionButton = { ( ) => < button > test button</ button > }
2405
+ hideDeprecatedTerms = { false }
2406
+ showIcons = { true }
2407
+ />
2408
+ ) }
2407
2409
</ div >
2408
2410
2409
2411
</ div >
0 commit comments