@mintjamsinc/ichigojs 0.1.49 → 0.1.50
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/ichigo.cjs +19 -2
- package/dist/ichigo.cjs.map +1 -1
- package/dist/ichigo.esm.js +19 -2
- package/dist/ichigo.esm.js.map +1 -1
- package/dist/ichigo.esm.min.js +1 -1
- package/dist/ichigo.min.cjs +1 -1
- package/dist/ichigo.umd.js +19 -2
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/ichigo.cjs
CHANGED
|
@@ -7581,9 +7581,17 @@
|
|
|
7581
7581
|
#updateProperty(element, name, value) {
|
|
7582
7582
|
if (value == null && (name === 'value' || name === 'textContent' || name === 'innerHTML')) {
|
|
7583
7583
|
element[name] = '';
|
|
7584
|
+
if (name === 'value') {
|
|
7585
|
+
element._value = null;
|
|
7586
|
+
}
|
|
7584
7587
|
}
|
|
7585
7588
|
else {
|
|
7586
7589
|
element[name] = value;
|
|
7590
|
+
if (name === 'value') {
|
|
7591
|
+
// Store the original typed value so that v-model on radio buttons
|
|
7592
|
+
// can preserve the type (e.g., boolean false instead of string "false").
|
|
7593
|
+
element._value = value;
|
|
7594
|
+
}
|
|
7587
7595
|
}
|
|
7588
7596
|
}
|
|
7589
7597
|
/**
|
|
@@ -10771,7 +10779,12 @@
|
|
|
10771
10779
|
element.checked = !!value;
|
|
10772
10780
|
}
|
|
10773
10781
|
else if (element.type === 'radio') {
|
|
10774
|
-
|
|
10782
|
+
// Prefer the original typed value stored by VBindDirective (:value binding)
|
|
10783
|
+
// to avoid type coercion issues (e.g., boolean false vs string "false").
|
|
10784
|
+
const radioValue = element._value !== undefined
|
|
10785
|
+
? element._value
|
|
10786
|
+
: element.value;
|
|
10787
|
+
element.checked = radioValue === value;
|
|
10775
10788
|
}
|
|
10776
10789
|
else {
|
|
10777
10790
|
element.value = value ?? '';
|
|
@@ -10799,7 +10812,11 @@
|
|
|
10799
10812
|
newValue = target.checked;
|
|
10800
10813
|
}
|
|
10801
10814
|
else if (target.type === 'radio') {
|
|
10802
|
-
|
|
10815
|
+
// Prefer the original typed value stored by VBindDirective (:value binding)
|
|
10816
|
+
// to preserve the type on write-back (e.g., boolean false, number 0).
|
|
10817
|
+
newValue = target._value !== undefined
|
|
10818
|
+
? target._value
|
|
10819
|
+
: target.value;
|
|
10803
10820
|
}
|
|
10804
10821
|
else {
|
|
10805
10822
|
newValue = target.value;
|