@typeolymp/ui-components 1.19.4 → 1.19.5

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/build/index.es.js CHANGED
@@ -8029,11 +8029,15 @@ var Number$1 = function (props) {
8029
8029
  };
8030
8030
  var onChange = function () {
8031
8031
  var value = parseInt(inputRef.current.value);
8032
- var newValue = setValue(value);
8033
8032
  if (!props.disabled && !!props.onChange)
8034
- props.onChange(newValue);
8033
+ props.onChange(value);
8035
8034
  };
8036
8035
  var onBlur = function () {
8036
+ var value = parseInt(inputRef.current.value);
8037
+ var newValue = setValue(value);
8038
+ // If the value has changed, call the onChange callback
8039
+ if (value !== newValue && !!props.onChange)
8040
+ props.onChange(newValue);
8037
8041
  if (!!props.onBlur)
8038
8042
  props.onBlur();
8039
8043
  };