@pageboard/html 0.11.8 → 0.11.9
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 +1 -1
- package/ui/fieldset.js +4 -1
- package/ui/form.js +2 -2
package/package.json
CHANGED
package/ui/fieldset.js
CHANGED
|
@@ -11,7 +11,10 @@ class HTMLCustomFieldSetElement extends HTMLFieldSetElement {
|
|
|
11
11
|
#update() {
|
|
12
12
|
if (this.isContentEditable || !this.options.name) return;
|
|
13
13
|
const val = this.form?.read(true)?.[this.options.name];
|
|
14
|
-
this.disabled = this.hidden = val != this.options.value;
|
|
14
|
+
const disabled = this.disabled = this.hidden = val != this.options.value;
|
|
15
|
+
for (const node of this.querySelectorAll('[name]')) {
|
|
16
|
+
node.disabled = disabled;
|
|
17
|
+
}
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
patch(state) {
|
package/ui/form.js
CHANGED
|
@@ -65,8 +65,8 @@ class HTMLCustomFormElement extends HTMLFormElement {
|
|
|
65
65
|
// withDefaults: keep value if equals to its default
|
|
66
66
|
// else unset value
|
|
67
67
|
for (const node of this.elements) {
|
|
68
|
-
const { name, type } = node;
|
|
69
|
-
if (name == null || name == "" || type == "button") {
|
|
68
|
+
const { name, type, disabled } = node;
|
|
69
|
+
if (name == null || name == "" || type == "button" || disabled) {
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
72
|
let val = node.value;
|