@aquera/nile-elements 0.0.1-beta.14 → 0.0.1-beta.15

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
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.0.1-beta.14",
6
+ "version": "0.0.1-beta.15",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -72,6 +72,7 @@ export class NileRadioGroup extends NileElement {
72
72
  connectedCallback() {
73
73
  super.connectedCallback();
74
74
  this.defaultValue = this.value;
75
+ this.handleInitialDisabledState();
75
76
  }
76
77
 
77
78
  private getAllRadios() {
@@ -96,13 +97,19 @@ export class NileRadioGroup extends NileElement {
96
97
  }
97
98
  }
98
99
 
99
- @watch('disabled')
100
+ @watch('disabled', { waitUntilFirstUpdate: true })
100
101
  handleDisabledChange() {
101
102
  this.getAllRadios().forEach(radio => {
102
103
  radio.disabled = this.disabled;
103
104
  });
104
105
  }
105
106
 
107
+ private handleInitialDisabledState() {
108
+ this.getAllRadios().forEach(radio => {
109
+ radio.disabled = radio.hasAttribute('disabled') ? radio.disabled : this.disabled;
110
+ });
111
+ }
112
+
106
113
  private handleKeyDown(event: KeyboardEvent) {
107
114
  if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(event.key)) {
108
115
  return;