componenteshospitais 1.9.9 → 2.0.0

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/dist/cjs/index.js CHANGED
@@ -1504,7 +1504,9 @@ var InputField = function (_a) {
1504
1504
  if (type === 'number' && e.target.value.length > appliedMaxLength) {
1505
1505
  e.target.value = e.target.value.slice(0, appliedMaxLength);
1506
1506
  }
1507
- onChange(e);
1507
+ if (onChange) { // Verificando se onChange foi passado antes de chamá-lo
1508
+ onChange(e);
1509
+ }
1508
1510
  };
1509
1511
  var mask = maskType === 'cpf' ? '999.999.999-99' :
1510
1512
  maskType === 'phone' ? '(99) 99999-9999' :