@ewc-lib/ewc-icon-button-group 3.0.0-alpha → 3.1.1-alpha

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ewc-lib/ewc-icon-button-group",
3
3
  "//": "please always keep version in sync with constructor in main.js",
4
- "version": "3.0.0-alpha",
4
+ "version": "3.1.1-alpha",
5
5
  "basedOnStandard": "3.0.1",
6
6
  "description": "",
7
7
  "main": "src/main.js",
@@ -16,6 +16,6 @@
16
16
  "@ewc-lib/ewc-css-common": "0.1.0"
17
17
  },
18
18
  "dependencies": {
19
- "@ewc-lib/ewc-icon-button": "2.1.0-alpha"
19
+ "@ewc-lib/ewc-icon-button": "2.2.0-alpha"
20
20
  }
21
21
  }
package/readme.md CHANGED
@@ -182,6 +182,12 @@ European Union Public License (EUPL)
182
182
 
183
183
  # Changelog
184
184
 
185
+ - 3.1.1-alpha
186
+ - bugfix: id in action event contains id of previously selected element instead of currently clicked element
187
+
188
+ - 3.1.0-alpha
189
+ - change config (colors) to match latest design
190
+
185
191
  - 3.0.0-alpha
186
192
  - properly support disabled state,
187
193
  - add selection by id
package/screenshot.png CHANGED
Binary file
package/src/main.js CHANGED
@@ -29,7 +29,7 @@ class Element extends HTMLElement {
29
29
  }
30
30
 
31
31
  connectedCallback() {
32
- this.setAttribute("ewc-version", "3.0.0-alpha") // please always keep in sync with version in package.json
32
+ this.setAttribute("ewc-version", "3.1.1-alpha") // please always keep in sync with version in package.json
33
33
  if(this.#isInitialised == true) {return}
34
34
 
35
35
  this.classList.add(this.#cssClassPrefix)
@@ -126,7 +126,7 @@ class Element extends HTMLElement {
126
126
  // no operation. the already pressed button has been clicked again.
127
127
  } else {
128
128
  if(this.selectedElement) {
129
- const event = new CustomEvent("action", { detail: {"index":i, "id":this.selectedElement.getAttribute("id")} });
129
+ const event = new CustomEvent("action", { detail: {"index":i, "id":this.#getElByIndex(i).getAttribute("id")} });
130
130
  this.dispatchEvent(event)
131
131
  }
132
132
  //console.debug("ewc-icon-button-group: sent new action event")