@optionfactory/ful 0.94.0 → 0.95.0
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/dist/ful.iife.js +10 -2
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +10 -2
- package/dist/ful.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ful.iife.js
CHANGED
|
@@ -1472,15 +1472,23 @@ var ful = (function (exports) {
|
|
|
1472
1472
|
await this.submitter?.(this.values, this);
|
|
1473
1473
|
});
|
|
1474
1474
|
});
|
|
1475
|
+
if(this.hasAttribute("clear-invalid-on-change")){
|
|
1476
|
+
this.addEventListener('change', evt => {
|
|
1477
|
+
const target = /** @type HTMLElement */ (evt.target);
|
|
1478
|
+
target?.querySelectorAll(`.${CSS.escape(Form.INVALID_CLASS)}`).forEach(el => {
|
|
1479
|
+
el.classList.remove(Form.INVALID_CLASS);
|
|
1480
|
+
});
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1475
1483
|
this.replaceChildren(form);
|
|
1476
1484
|
}
|
|
1477
1485
|
spinner(spin) {
|
|
1478
1486
|
this.querySelectorAll('ful-spinner').forEach(el => {
|
|
1479
|
-
const hel = /** @type HTMLElement
|
|
1487
|
+
const hel = /** @type HTMLElement */ (el);
|
|
1480
1488
|
hel.hidden = !spin;
|
|
1481
1489
|
});
|
|
1482
1490
|
this.querySelectorAll('[type=submit],[type=reset]').forEach(el => {
|
|
1483
|
-
const hel = /** @type HTMLButtonElement
|
|
1491
|
+
const hel = /** @type HTMLButtonElement */ (el);
|
|
1484
1492
|
hel.disabled = spin;
|
|
1485
1493
|
});
|
|
1486
1494
|
}
|