@synerise/ds-input 0.18.5 → 0.18.8
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.18.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.7...@synerise/ds-input@0.18.8) (2022-03-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.18.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.6...@synerise/ds-input@0.18.7) (2022-02-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.18.6](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.5...@synerise/ds-input@0.18.6) (2022-02-16)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **input:** InputMultivalue add prop onChange ([16fbfcb](https://github.com/synerise/synerise-design/commit/16fbfcbc1be40471b3a1078d9bf5bbe19b9ce9ed))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [0.18.5](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.4...@synerise/ds-input@0.18.5) (2022-02-03)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @synerise/ds-input
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "errorText", "label", "description", "values", "onBlur", "onFocus", "disabled", "maxLength", "error"];
|
|
1
|
+
var _excluded = ["className", "errorText", "label", "description", "values", "onChange", "onBlur", "onFocus", "disabled", "maxLength", "error"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
@@ -15,6 +15,7 @@ var InputMultivalue = function InputMultivalue(props) {
|
|
|
15
15
|
label = props.label,
|
|
16
16
|
description = props.description,
|
|
17
17
|
values = props.values,
|
|
18
|
+
onChange = props.onChange,
|
|
18
19
|
_onBlur = props.onBlur,
|
|
19
20
|
onFocus = props.onFocus,
|
|
20
21
|
disabled = props.disabled,
|
|
@@ -38,9 +39,14 @@ var InputMultivalue = function InputMultivalue(props) {
|
|
|
38
39
|
selectedValues = _React$useState3[0],
|
|
39
40
|
setSelectedValues = _React$useState3[1];
|
|
40
41
|
|
|
42
|
+
var handleNewValue = function handleNewValue(selected) {
|
|
43
|
+
onChange && onChange(selected);
|
|
44
|
+
setSelectedValues(selected);
|
|
45
|
+
};
|
|
46
|
+
|
|
41
47
|
var handleKeyDown = function handleKeyDown(e) {
|
|
42
48
|
if (e.key === 'Enter') {
|
|
43
|
-
|
|
49
|
+
handleNewValue([].concat(selectedValues, [value]));
|
|
44
50
|
setValue(emptyValue);
|
|
45
51
|
}
|
|
46
52
|
};
|
|
@@ -68,7 +74,7 @@ var InputMultivalue = function InputMultivalue(props) {
|
|
|
68
74
|
var filteredValues = selectedValues.filter(function (v) {
|
|
69
75
|
return v !== val;
|
|
70
76
|
});
|
|
71
|
-
|
|
77
|
+
handleNewValue(filteredValues);
|
|
72
78
|
},
|
|
73
79
|
value: val,
|
|
74
80
|
focused: isFocused
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.8",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-icon": "^0.47.
|
|
36
|
-
"@synerise/ds-scrollbar": "^0.4.
|
|
37
|
-
"@synerise/ds-tooltip": "^0.11.
|
|
35
|
+
"@synerise/ds-icon": "^0.47.2",
|
|
36
|
+
"@synerise/ds-scrollbar": "^0.4.5",
|
|
37
|
+
"@synerise/ds-tooltip": "^0.11.7",
|
|
38
38
|
"@synerise/ds-typography": "^0.12.2",
|
|
39
39
|
"@synerise/ds-utils": "^0.19.0",
|
|
40
40
|
"antd-mask-input": "^0.1.13",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"antd": "^4",
|
|
46
46
|
"react": ">=16.9.0 < 17.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "739b52320bb20c1646371224de5bb0c3454fac8c"
|
|
49
49
|
}
|