@nys-cui/cui-section 0.2.15 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/section.js +3 -2
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "main": "./dist/js/section.js",
8
8
  "type": "module",
9
- "version": "0.2.15",
9
+ "version": "0.2.17",
10
10
  "scripts": {
11
11
  "clean": "rm -rf ./dist",
12
12
  "build": "npm run clean && cui --dep",
package/src/section.js CHANGED
@@ -30,7 +30,8 @@ export default class CUI_SECTION extends HTMLElement {
30
30
  "sectiontitle": "sTitle",
31
31
  "hideControls": "bHideControls",
32
32
  "collapsed": "bCollapsed",
33
- "styles": "asStyles"
33
+ "styles": "asStyles",
34
+ "label": "sTitle"
34
35
 
35
36
  }
36
37
  }
@@ -199,7 +200,7 @@ export default class CUI_SECTION extends HTMLElement {
199
200
  connectedCallback() {
200
201
 
201
202
  this.state = {
202
- sTitle: this.getAttribute('sectiontitle') || "SECTION TITLE",
203
+ sTitle: this.state.sTitle || this.getAttribute('sectiontitle') || "SECTION TITLE",
203
204
  bHideControls: this.hasAttribute("hideControls") ? true : false,
204
205
  bCollapsed: (this.getAttribute('collapsed') === "true") ? true : false,
205
206
  asStyles: (this.getAttribute('styles')) ? this.getAttribute('styles').split(',') : null