Socket
Socket
Sign inDemoInstall

rc-input-number

Package Overview
Dependencies
3
Maintainers
7
Versions
216
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.3.1 to 7.3.2

es/hooks/useFrame.d.ts

33

es/InputNumber.js

@@ -16,2 +16,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

import useUpdateEffect from './hooks/useUpdateEffect';
import useFrame from './hooks/useFrame';
/**

@@ -286,5 +287,6 @@ * We support `stringMode` which need handle correct type when user call in onChange

}; // ========================== User Input ==========================
// >>> Collect input value
var onNextPromise = useFrame(); // >>> Collect input value
var collectInputValue = function collectInputValue(inputStr) {

@@ -302,3 +304,19 @@ recordCursor(); // Update inputValue incase input can not parse as number

}
}
} // Trigger onInput later to let user customize value if they want do handle something after onChange
onInput === null || onInput === void 0 ? void 0 : onInput(inputStr); // optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
onNextPromise(function () {
var nextInputStr = inputStr;
if (!parser) {
nextInputStr = inputStr.replace(/。/g, '.');
}
if (nextInputStr !== inputStr) {
collectInputValue(nextInputStr);
}
});
}; // >>> Composition

@@ -318,12 +336,3 @@

var onInternalInput = function onInternalInput(e) {
var inputStr = e.target.value; // optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
if (!parser) {
inputStr = inputStr.replace(/。/g, '.');
}
collectInputValue(inputStr); // Trigger onInput later to let user customize value if they want do handle something after onChange
onInput === null || onInput === void 0 ? void 0 : onInput(inputStr);
collectInputValue(e.target.value);
}; // ============================= Step =============================

@@ -330,0 +339,0 @@

@@ -40,2 +40,4 @@ "use strict";

var _useFrame = _interopRequireDefault(require("./hooks/useFrame"));
var _excluded = ["prefixCls", "className", "style", "min", "max", "step", "defaultValue", "value", "disabled", "readOnly", "upHandler", "downHandler", "keyboard", "controls", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep"];

@@ -310,5 +312,6 @@

}; // ========================== User Input ==========================
// >>> Collect input value
var onNextPromise = (0, _useFrame.default)(); // >>> Collect input value
var collectInputValue = function collectInputValue(inputStr) {

@@ -326,3 +329,19 @@ recordCursor(); // Update inputValue incase input can not parse as number

}
}
} // Trigger onInput later to let user customize value if they want do handle something after onChange
onInput === null || onInput === void 0 ? void 0 : onInput(inputStr); // optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
onNextPromise(function () {
var nextInputStr = inputStr;
if (!parser) {
nextInputStr = inputStr.replace(/。/g, '.');
}
if (nextInputStr !== inputStr) {
collectInputValue(nextInputStr);
}
});
}; // >>> Composition

@@ -342,12 +361,3 @@

var onInternalInput = function onInternalInput(e) {
var inputStr = e.target.value; // optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
if (!parser) {
inputStr = inputStr.replace(/。/g, '.');
}
collectInputValue(inputStr); // Trigger onInput later to let user customize value if they want do handle something after onChange
onInput === null || onInput === void 0 ? void 0 : onInput(inputStr);
collectInputValue(e.target.value);
}; // ============================= Step =============================

@@ -354,0 +364,0 @@

{
"name": "rc-input-number",
"version": "7.3.1",
"version": "7.3.2",
"description": "React input-number component",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc