@pageboard/html 0.10.32 → 0.10.33
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/consent.js +4 -1
- package/ui/fieldset.js +3 -7
package/package.json
CHANGED
package/ui/consent.js
CHANGED
|
@@ -39,7 +39,10 @@ class HTMLCustomConsentElement extends HTMLFormElement {
|
|
|
39
39
|
}
|
|
40
40
|
handleChange(e, state) {
|
|
41
41
|
if (e.type == "submit" || !this.elements.find(item => item.type == "submit")) {
|
|
42
|
-
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
// let fieldset handle change first
|
|
44
|
+
this.handleSubmit(e, state);
|
|
45
|
+
}, 10);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
handleSubmit(e, state) {
|
package/ui/fieldset.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
class HTMLCustomFieldSetElement extends HTMLFieldSetElement {
|
|
2
|
-
static defaults = {
|
|
3
|
-
dataName: null,
|
|
4
|
-
dataValue: null
|
|
5
|
-
};
|
|
6
2
|
constructor() {
|
|
7
3
|
super();
|
|
8
4
|
this.init?.();
|
|
9
5
|
}
|
|
10
6
|
|
|
11
7
|
#update() {
|
|
12
|
-
if (this.isContentEditable || !this.
|
|
13
|
-
const name = this.
|
|
8
|
+
if (this.isContentEditable || !this.dataset.name) return;
|
|
9
|
+
const name = this.dataset.name.split(".").slice(1).join('.');
|
|
14
10
|
const vals = this.form ? window.HTMLCustomFormElement.prototype.read.call(this.form, true) : {};
|
|
15
11
|
const val = vals[name];
|
|
16
|
-
this.disabled = this.hidden = val != this.
|
|
12
|
+
this.disabled = this.hidden = val != this.dataset.value;
|
|
17
13
|
}
|
|
18
14
|
patch() {
|
|
19
15
|
this.#update();
|