@bigbinary/neetoui 5.2.40 → 5.2.41

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/index.cjs.js CHANGED
@@ -21147,11 +21147,15 @@ var Input$3 = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
21147
21147
  onChange(e);
21148
21148
  };
21149
21149
  var handleChange = rejectCharsRegex ? handleRegexChange : onChange;
21150
+ var handleTrimmedChangeOnBlur = function handleTrimmedChangeOnBlur(e) {
21151
+ if (disableTrimOnBlur || typeof value !== "string") return;
21152
+ var trimmedValue = value.trim();
21153
+ if (value === trimmedValue) return;
21154
+ e.target.value = trimmedValue;
21155
+ handleChange(e);
21156
+ };
21150
21157
  var handleOnBlur = function handleOnBlur(e) {
21151
- if (!disableTrimOnBlur && typeof value === "string") {
21152
- e.target.value = value.trim();
21153
- handleChange(e);
21154
- }
21158
+ handleTrimmedChangeOnBlur(e);
21155
21159
  onBlur === null || onBlur === void 0 || onBlur(e);
21156
21160
  };
21157
21161
  return /*#__PURE__*/React__default["default"].createElement("div", {