neo.mjs 4.3.7 → 4.3.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
CHANGED
@@ -45,8 +45,9 @@
|
|
45
45
|
}
|
46
46
|
|
47
47
|
&.label-bottom {
|
48
|
-
align-items
|
49
|
-
flex-direction: column-reverse;
|
48
|
+
align-items : stretch;
|
49
|
+
flex-direction : column-reverse;
|
50
|
+
justify-content: start;
|
50
51
|
|
51
52
|
.neo-textfield-label {
|
52
53
|
margin-top: 3px;
|
@@ -164,7 +165,7 @@
|
|
164
165
|
}
|
165
166
|
|
166
167
|
&.label-top {
|
167
|
-
align-items :
|
168
|
+
align-items : stretch;
|
168
169
|
flex-direction: column;
|
169
170
|
|
170
171
|
.neo-textfield-label {
|
package/src/component/Base.mjs
CHANGED
@@ -405,7 +405,7 @@ class Base extends CoreBase {
|
|
405
405
|
vdomRoot.cls = [...value];
|
406
406
|
} else {
|
407
407
|
// we need to merge changes
|
408
|
-
cls =
|
408
|
+
cls = NeoArray.union(me.wrapperCls, value);
|
409
409
|
NeoArray.remove(cls, NeoArray.difference(oldValue, value));
|
410
410
|
vdom.cls = cls;
|
411
411
|
}
|
@@ -729,7 +729,7 @@ class Base extends CoreBase {
|
|
729
729
|
|
730
730
|
if (vdom === vdomRoot) {
|
731
731
|
// we need to merge changes
|
732
|
-
cls =
|
732
|
+
cls = NeoArray.union(cls, value);
|
733
733
|
NeoArray.remove(cls, NeoArray.difference(oldValue, value));
|
734
734
|
vdom.cls = cls;
|
735
735
|
|
package/src/core/Util.mjs
CHANGED
package/src/form/field/Text.mjs
CHANGED
@@ -347,6 +347,9 @@ class Text extends Base {
|
|
347
347
|
me.updateCenterBorderElWidth(false);
|
348
348
|
}, 20);
|
349
349
|
}
|
350
|
+
} else {
|
351
|
+
// changes from e.g. left to top
|
352
|
+
me.updateInputWidth();
|
350
353
|
}
|
351
354
|
}
|
352
355
|
|
@@ -563,8 +566,8 @@ class Text extends Base {
|
|
563
566
|
|
564
567
|
me.getInputEl().value = value;
|
565
568
|
|
566
|
-
if (
|
567
|
-
NeoArray[value && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
|
569
|
+
if (Neo.isEmpty(value) !== Neo.isEmpty(oldValue)) {
|
570
|
+
NeoArray[value !== null && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
|
568
571
|
}
|
569
572
|
|
570
573
|
NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](cls, 'neo-is-dirty');
|
@@ -972,8 +975,12 @@ class Text extends Base {
|
|
972
975
|
reset(value=null) {
|
973
976
|
let me = this;
|
974
977
|
|
975
|
-
if (
|
976
|
-
|
978
|
+
if (me.clearToOriginalValue) {
|
979
|
+
if (value) {
|
980
|
+
me.originalConfig.value = value;
|
981
|
+
} else {
|
982
|
+
value = me.originalConfig.value
|
983
|
+
}
|
977
984
|
}
|
978
985
|
|
979
986
|
super.reset(value);
|
package/src/vdom/Helper.mjs
CHANGED
@@ -439,7 +439,7 @@ class Helper extends Base {
|
|
439
439
|
|
440
440
|
Object.entries(value).forEach(([key, value]) => {
|
441
441
|
if (!(oldVnode.attributes.hasOwnProperty(key) && oldVnode.attributes[key] === value)) {
|
442
|
-
if (!Neo.isString(value) && Neo.isEmpty(value)) {
|
442
|
+
if (value !== null && !Neo.isString(value) && Neo.isEmpty(value)) {
|
443
443
|
// ignore empty arrays & objects
|
444
444
|
} else {
|
445
445
|
attributes[key] = value;
|