@woosmap/ui 4.100.1 → 4.100.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.100.1",
3
+ "version": "4.100.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -28,10 +28,10 @@ export default class Input extends Component {
28
28
  };
29
29
 
30
30
  increment = () => {
31
- const { onChange, value: oldValue, name } = this.props;
31
+ const { onChange, value: oldValue, name, step } = this.props;
32
32
  const { value: stateValue } = this.state;
33
33
  const theValue = oldValue || stateValue;
34
- const newValue = theValue ? theValue + 1 : 1;
34
+ const newValue = theValue ? theValue + step : step;
35
35
  if (onChange) {
36
36
  onChange({ target: { name, value: newValue } });
37
37
  } else {
@@ -40,10 +40,10 @@ export default class Input extends Component {
40
40
  };
41
41
 
42
42
  decrement = () => {
43
- const { onChange, value: oldValue, name } = this.props;
43
+ const { onChange, value: oldValue, name, step } = this.props;
44
44
  const { value: stateValue } = this.state;
45
45
  const theValue = oldValue || stateValue;
46
- const newValue = theValue ? theValue - 1 : 0;
46
+ const newValue = theValue ? theValue - step : 0;
47
47
  if (onChange) {
48
48
  onChange({ target: { name, value: newValue } });
49
49
  } else {
@@ -216,6 +216,7 @@ Input.propTypes = {
216
216
  onPressEnter: PropTypes.func,
217
217
  enableTogglePassword: PropTypes.bool,
218
218
  isInputIconFill: PropTypes.bool,
219
+ step: PropTypes.number,
219
220
  };
220
221
 
221
222
  Input.defaultProps = {
@@ -242,4 +243,5 @@ Input.defaultProps = {
242
243
  onFocus: null,
243
244
  enableTogglePassword: false,
244
245
  isInputIconFill: false,
246
+ step: 1,
245
247
  };