@syncfusion/ej2-inputs 22.2.9 → 22.2.12

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.
@@ -107,11 +107,23 @@ var Input;
107
107
  Input.bindInitialEvent = bindInitialEvent;
108
108
  function checkInputValue(floatLabelType, inputElement) {
109
109
  var inputValue = inputElement.value;
110
- if (inputValue !== '' && !isNullOrUndefined(inputValue) && inputElement.parentElement) {
111
- inputElement.parentElement.classList.add('e-valid-input');
110
+ var inputParent = inputElement.parentElement;
111
+ var grandParent = inputParent.parentElement;
112
+ if (inputValue !== '' && !isNullOrUndefined(inputValue)) {
113
+ if (inputParent && inputParent.classList.contains('e-input-group')) {
114
+ inputParent.classList.add('e-valid-input');
115
+ }
116
+ else if (grandParent && grandParent.classList.contains('e-input-group')) {
117
+ grandParent.classList.add('e-valid-input');
118
+ }
112
119
  }
113
- else if (floatLabelType !== 'Always' && inputElement.parentElement) {
114
- inputElement.parentElement.classList.remove('e-valid-input');
120
+ else if (floatLabelType !== 'Always') {
121
+ if (inputParent && inputParent.classList.contains('e-input-group')) {
122
+ inputParent.classList.remove('e-valid-input');
123
+ }
124
+ else if (grandParent && grandParent.classList.contains('e-input-group')) {
125
+ grandParent.classList.remove('e-valid-input');
126
+ }
115
127
  }
116
128
  }
117
129
  function _focusFn() {
@@ -845,7 +857,11 @@ var Input;
845
857
  var result = container.querySelectorAll(inputElement.tagName + ' ~ *');
846
858
  innerWrapper.appendChild(inputElement);
847
859
  for (var i = 0; i < result.length; i++) {
848
- innerWrapper.appendChild(result[parseInt(i.toString())]);
860
+ var element = result[parseInt(i.toString())];
861
+ var parentElement = innerWrapper.parentElement;
862
+ if (!(element.classList.contains('e-float-line')) || (!(parentElement && parentElement.classList.contains('e-filled')) && parentElement)) {
863
+ innerWrapper.appendChild(element);
864
+ }
849
865
  }
850
866
  }
851
867
  innerWrapper.parentNode.insertBefore(button, innerWrapper);