Fixed an issue where sites/subsites were missing from the WebUrl dropdown

The search query responsible for feeding the Web Url dropdown had no
rowLimit specified, which was limiting the amount of returned urls to 10
since this is the default rowLimit. Updated the rowLimit to 500 so all
sites can be displayed in the toolpart!
This commit is contained in:
Simon-Pierre Plante 2017-08-31 19:09:17 -04:00
parent 785c9ffc14
commit 4dea634f15
9 changed files with 8 additions and 9 deletions

View File

@ -27,6 +27,7 @@ Version|Date|Comments
1.0.0|May 04, 2017|Initial release 1.0.0|May 04, 2017|Initial release
1.0.1|July 23rd 15, 2017|Updated to GA Version 1.0.1|July 23rd 15, 2017|Updated to GA Version
1.0.3|August 12, 2017|Added external scripts functionnality 1.0.3|August 12, 2017|Added external scripts functionnality
1.0.4|August 31, 2017|Fixed a bug where tenant sites/subsites were missing from the **Web Url** dropdown
## Disclaimer ## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

View File

@ -2,7 +2,7 @@
"solution": { "solution": {
"name": "React Content Query", "name": "React Content Query",
"id": "00406271-0276-406f-9666-512623eb6709", "id": "00406271-0276-406f-9666-512623eb6709",
"version": "1.0.0.0" "version": "1.0.4.0"
}, },
"paths": { "paths": {
"zippedPackage": "solution/react-content-query-webpart.sppkg" "zippedPackage": "solution/react-content-query-webpart.sppkg"

View File

@ -1,3 +1,3 @@
{ {
"cdnBasePath": "https://publiccdn.sharepointonline.com/spptechnologies.sharepoint.com/110700492eeea162ee5bad0f35b1f0061ded8bf436ce0199efe2a4d24109e1c0df1ec594/react-content-query-1.0.3" "cdnBasePath": "https://publiccdn.sharepointonline.com/spptechnologies.sharepoint.com/110700492eeea162ee5bad0f35b1f0061ded8bf436ce0199efe2a4d24109e1c0df1ec594/react-content-query-1.0.4"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "react-content-query", "name": "react-content-query",
"version": "1.0.3", "version": "1.0.4",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"

View File

@ -24,7 +24,7 @@ export class SearchService {
**************************************************************************************************/ **************************************************************************************************/
public getWebUrlsForDomain(domainUrl: string): Promise<string[]> { public getWebUrlsForDomain(domainUrl: string): Promise<string[]> {
return new Promise<string[]>((resolve,reject) => { return new Promise<string[]>((resolve,reject) => {
let endpoint = Text.format("{0}/_api/search/query?querytext='Path:{0}/* AND (contentclass:STS_Site OR contentclass:STS_Web)'&selectproperties='Path'&trimduplicates=false", domainUrl); let endpoint = Text.format("{0}/_api/search/query?querytext='Path:{0}/* AND (contentclass:STS_Site OR contentclass:STS_Web)'&selectproperties='Path'&trimduplicates=false&rowLimit=500", domainUrl);
// Gets the available webs for the current domain with a search query // Gets the available webs for the current domain with a search query
this.spHttpClient.get(endpoint, SPHttpClient.configurations.v1).then((response: SPHttpClientResponse) => { this.spHttpClient.get(endpoint, SPHttpClient.configurations.v1).then((response: SPHttpClientResponse) => {

View File

@ -4,7 +4,7 @@
"id": "46edf08f-95c7-4ca7-9146-6471f9f471be", "id": "46edf08f-95c7-4ca7-9146-6471f9f471be",
"alias": "ContentQueryWebPart", "alias": "ContentQueryWebPart",
"componentType": "WebPart", "componentType": "WebPart",
"version": "1.0.1", "version": "1.0.4",
"manifestVersion": 2, "manifestVersion": 2,
"preconfiguredEntries": [{ "preconfiguredEntries": [{
@ -15,7 +15,7 @@
"default": "A react content by query WebPart for querying items within a site and easily displaying them using a simple yet powerfull HandleBars templating engine.", "default": "A react content by query WebPart for querying items within a site and easily displaying them using a simple yet powerfull HandleBars templating engine.",
"fr-FR": "Une composante React permettant d'effectuer des requêtes sur les items et de facilement afficher les résultat à l'aide de gabarits HandleBars fournit par l'utilisateur" "fr-FR": "Une composante React permettant d'effectuer des requêtes sur les items et de facilement afficher les résultat à l'aide de gabarits HandleBars fournit par l'utilisateur"
}, },
"officeFabricIconFontName": "Page", "officeFabricIconFontName": "BulletedList",
"properties": { "properties": {
"description": "React Content Query WebPart" "description": "React Content Query WebPart"
} }

View File

@ -55,7 +55,7 @@ export default class ContentQueryWebPart extends BaseClientSideWebPart<IContentQ
* Returns the WebPart's version * Returns the WebPart's version
***************************************************************************/ ***************************************************************************/
protected get dataVersion(): Version { protected get dataVersion(): Version {
return Version.parse('1.0.3'); return Version.parse('1.0.4');
} }

View File

@ -279,8 +279,6 @@ export default class ContentQuery extends React.Component<IContentQueryProps, IC
const error = this.state.error ? <div className={styles.cqwpError}>{this.state.error}</div> : <div />; const error = this.state.error ? <div className={styles.cqwpError}>{this.state.error}</div> : <div />;
const mandatoryFieldsConfigured = this.areMandatoryFieldsConfigured(); const mandatoryFieldsConfigured = this.areMandatoryFieldsConfigured();
console.log('Rendering now...');
return ( return (
<div className={styles.cqwp}> <div className={styles.cqwp}>