@wavemaker/app-ng-runtime 11.5.0-next.24731 → 11.5.0-next.24733

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.
@@ -1443,6 +1443,11 @@ const addClass = (node, nv, sync) => {
1443
1443
  });
1444
1444
  };
1445
1445
  const switchClass = (node, toAdd = '', toRemove = '', sync) => {
1446
+ // After NG15 upgrade ng-invalid class is added even the field is valid, so we are removing the ng-invalid manually
1447
+ const isNgUntouchedValid = node.classList.contains('ng-untouched') && node.classList.contains('ng-valid');
1448
+ if (isNgUntouchedValid && toAdd.includes('ng-untouched') && toAdd.includes('ng-invalid')) {
1449
+ toAdd = toAdd.replace('ng-invalid', '');
1450
+ }
1446
1451
  removeClass(node, toRemove, sync);
1447
1452
  addClass(node, toAdd, sync);
1448
1453
  };