neo.mjs 4.6.0 → 4.6.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -567,18 +567,21 @@ class Text extends Base {
567
567
  * @protected
568
568
  */
569
569
  afterSetValue(value, oldValue) {
570
- let me = this,
571
- cls = me.cls;
570
+ let me = this,
571
+ cls = me.cls,
572
+ emptyValue = Neo.isEmpty(value),
573
+ originalValue = me.originalConfig.value,
574
+ isDirty = value !== originalValue && emptyValue !== Neo.isEmpty(originalValue);
572
575
 
573
576
  me.silentVdomUpdate = true;
574
577
 
575
578
  me.getInputEl().value = value;
576
579
 
577
- if (Neo.isEmpty(value) !== Neo.isEmpty(oldValue)) {
580
+ if (emptyValue !== Neo.isEmpty(oldValue)) {
578
581
  NeoArray[value !== null && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
579
582
  }
580
583
 
581
- NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](cls, 'neo-is-dirty');
584
+ NeoArray[isDirty ? 'add' : 'remove'](cls, 'neo-is-dirty');
582
585
  me.cls = cls;
583
586
 
584
587
  me.validate(); // silent