diff --git a/README.md b/README.md index f983d65..1af0df3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Accordion -Accordion 1.2.0 ist ein listenbasiertes SPFx-WebPart für SharePoint Server Subscription Edition. Es orientiert +Accordion 1.2.1 ist ein listenbasiertes SPFx-WebPart für SharePoint Server Subscription Edition. Es orientiert sich funktional am PnP-Beispiel `react-accordion-dynamic-section`, verwendet aber die mit SharePoint SE kompatible SPFx-1.4.1-/React-15-Toolchain. @@ -41,7 +41,7 @@ nächsten Laden beziehungsweise Rendern der Seite automatisch. | Eigenschaft | Wert | |---|---| -| Version | 1.2.0 | +| Version | 1.2.1 | | SharePoint Framework | 1.4.1 | | React | 15.6.2 | | Node.js | 8.17.0 | diff --git a/config/package-solution.json b/config/package-solution.json index bf39e07..fe9819a 100644 --- a/config/package-solution.json +++ b/config/package-solution.json @@ -4,7 +4,7 @@ "name": "accordion-web-part", "title": "accordion-web-part", "id": "27a6fd90-42a1-4e39-8862-08ed0e7803bc", - "version": "1.2.0.0", + "version": "1.2.1.0", "includeClientSideAssets": true, "skipFeatureDeployment": true }, diff --git a/package.json b/package.json index b51370d..190c53e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "accordion-web-part", - "version": "1.2.0", + "version": "1.2.1", "private": true, "main": "lib/index.js", "engines": { diff --git a/src/webparts/accordion/AccordionWebPart.ts b/src/webparts/accordion/AccordionWebPart.ts index ed05141..241b9ac 100644 --- a/src/webparts/accordion/AccordionWebPart.ts +++ b/src/webparts/accordion/AccordionWebPart.ts @@ -75,7 +75,7 @@ export default class AccordionWebPart extends BaseClientSideWebPart = React.createElement(Accordion, { items: items, - title: this.properties.title || strings.DefaultTitle, + title: String(this.properties.title || '').trim(), allowMultiple: this.properties.allowMultiple === true, initialState: this.normalizeInitialState(this.properties.initialState), showCategories: this.properties.showCategories !== false && !!this.properties.categoryField, diff --git a/tests/validate-project.js b/tests/validate-project.js index 1eafc22..6a61e58 100644 --- a/tests/validate-project.js +++ b/tests/validate-project.js @@ -18,8 +18,8 @@ var component = read('src/webparts/accordion/components/Accordion.tsx'); var sanitizer = read('src/webparts/accordion/AccordionHtmlSanitizer.ts'); var styles = read('src/webparts/accordion/components/Accordion.module.scss'); -assert(packageJson.version === '1.2.0', 'Package version must be 1.2.0.'); -assert(solution.version === '1.2.0.0', 'Solution version must be 1.2.0.0.'); +assert(packageJson.version === '1.2.1', 'Package version must be 1.2.1.'); +assert(solution.version === '1.2.1.0', 'Solution version must be 1.2.1.0.'); assert(solution.includeClientSideAssets === true, 'Client-side assets must be included.'); assert(solution.skipFeatureDeployment === true, 'Solution must support central deployment.'); assert(packageJson.name === 'accordion-web-part' && solution.name === 'accordion-web-part' && @@ -32,6 +32,8 @@ assert(webPart.indexOf("PropertyPaneDropdown('listId'") >= 0, 'Dynamic list sele assert(webPart.indexOf("PropertyPaneTextField('title'") >= 0 && component.indexOf('styles.webPartHeading') >= 0, 'Configurable web part title is missing.'); +assert(webPart.indexOf("String(this.properties.title || '').trim()") >= 0, + 'An empty web part title must remain hidden.'); assert(webPart.indexOf("PropertyPaneDropdown('contentField'") >= 0, 'Dynamic content field selection is missing.'); assert(webPart.indexOf("PropertyPaneDropdown('categoryField'") >= 0, 'Category field selection is missing.'); assert(webPart.indexOf("PropertyPaneDropdown('selectedCategory'") >= 0, 'Category value filter is missing.');