Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-input-number

Package Overview
Dependencies
Maintainers
3
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-input-number - npm Package Compare versions

Comparing version 2.5.4 to 2.5.5

37

lib/InputNumber.js

@@ -114,8 +114,27 @@ 'use strict';

onBlur: function onBlur(event) {
var props = this.props;
var val = event.target.value.trim();
onBlur: function onBlur(e) {
var _props3;
this.setState({
focused: false
});
var value = this.getCurrentValidValue(e.target.value.trim());
this.setValue(value);
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
(_props3 = this.props).onBlur.apply(_props3, [e].concat(args));
},
onStepMouseDown: function onStepMouseDown(e) {
e.preventDefault();
var value = this.getCurrentValidValue(this.state.inputValue);
this.setState({ value: value });
},
getCurrentValidValue: function getCurrentValidValue(value) {
var val = value;
var props = this.props;
if (val === '') {

@@ -134,9 +153,3 @@ val = '';

}
this.setValue(val);
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
props.onBlur.apply(props, [event].concat(args));
return val;
},

@@ -277,3 +290,3 @@

onClick: upDisabledClass ? noop : this.up,
onMouseDown: preventDefault,
onMouseDown: this.onStepMouseDown,
className: prefixCls + '-handler ' + prefixCls + '-handler-up ' + upDisabledClass },

@@ -287,3 +300,3 @@ _react2['default'].createElement('span', { unselectable: 'unselectable', className: prefixCls + '-handler-up-inner',

ref: 'down',
onMouseDown: preventDefault,
onMouseDown: this.onStepMouseDown,
onClick: downDisabledClass ? noop : this.down,

@@ -290,0 +303,0 @@ className: prefixCls + '-handler ' + prefixCls + '-handler-down ' + downDisabledClass },

{
"name": "rc-input-number",
"version": "2.5.4",
"version": "2.5.5",
"description": "input-number ui component for react",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc