neo.mjs 4.3.6 → 4.3.8
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/src/core/Util.mjs +4 -0
- package/src/form/field/Text.mjs +6 -4
package/package.json
CHANGED
package/src/core/Util.mjs
CHANGED
package/src/form/field/Text.mjs
CHANGED
@@ -305,7 +305,7 @@ class Text extends Base {
|
|
305
305
|
|
306
306
|
NeoArray.remove(cls, 'label-' + oldValue);
|
307
307
|
NeoArray.add(cls, 'label-' + value);
|
308
|
-
me
|
308
|
+
me.cls = cls; // todo: silent update if needed
|
309
309
|
|
310
310
|
if (oldValue === 'inline') {
|
311
311
|
vdom = me.vdom;
|
@@ -558,17 +558,19 @@ class Text extends Base {
|
|
558
558
|
*/
|
559
559
|
afterSetValue(value, oldValue) {
|
560
560
|
let me = this,
|
561
|
+
cls = me.cls,
|
561
562
|
vdom = me.vdom;
|
562
563
|
|
563
564
|
me.getInputEl().value = value;
|
564
565
|
|
565
|
-
if (
|
566
|
-
NeoArray[value && value.toString().length > 0 ? 'add' : 'remove'](
|
566
|
+
if (Neo.isEmpty(value) !== Neo.isEmpty(oldValue)) {
|
567
|
+
NeoArray[value !== null && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
|
567
568
|
}
|
568
569
|
|
569
|
-
NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](
|
570
|
+
NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](cls, 'neo-is-dirty');
|
570
571
|
me.validate(); // silent
|
571
572
|
|
573
|
+
me.cls = cls;
|
572
574
|
me.vdom = vdom;
|
573
575
|
|
574
576
|
super.afterSetValue(value, oldValue); // fires the change event
|