techsbcn-storybook 2.15.3 → 2.15.4

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/index.js CHANGED
@@ -549,7 +549,8 @@ var TextFieldComponent = ({
549
549
  ...rest,
550
550
  onChange: (event) => {
551
551
  if (maxDecimals !== void 0) {
552
- event.target.value = event.target.value.replace(new RegExp(`([.,]\\d{${maxDecimals}})\\d+$`), "$1");
552
+ const truncated = event.target.value.replace(new RegExp(`([.,]\\d{${maxDecimals}})\\d+$`), "$1");
553
+ if (truncated !== event.target.value) event.target.value = truncated;
553
554
  }
554
555
  onChange?.(event);
555
556
  },