@commercetools-uikit/creatable-select-input 19.11.0 → 19.12.0
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.
|
@@ -126,7 +126,7 @@ const CreatableSelectInput = props => {
|
|
|
126
126
|
// state as an array instead of a boolean only.
|
|
127
127
|
// Otherwise the shapes would clash on submission, as
|
|
128
128
|
// Formik will create an array on submission anyways.
|
|
129
|
-
return props.name ?
|
|
129
|
+
return props.name ? `${props.name}.0` : undefined;
|
|
130
130
|
})()
|
|
131
131
|
},
|
|
132
132
|
persist: () => {}
|
|
@@ -134,7 +134,6 @@ const CreatableSelectInput = props => {
|
|
|
134
134
|
props.onBlur && props.onBlur(event);
|
|
135
135
|
} : undefined,
|
|
136
136
|
onChange: (value, info) => {
|
|
137
|
-
var _props$onChange;
|
|
138
137
|
// selectedOptions is either an array, or a single option, or null
|
|
139
138
|
// depending on whether we're in multi-mode or not (isMulti)
|
|
140
139
|
|
|
@@ -142,7 +141,7 @@ const CreatableSelectInput = props => {
|
|
|
142
141
|
if (props.isMulti && !newValue) {
|
|
143
142
|
newValue = [];
|
|
144
143
|
}
|
|
145
|
-
|
|
144
|
+
props.onChange?.({
|
|
146
145
|
target: {
|
|
147
146
|
id: props.id,
|
|
148
147
|
name: props.name,
|
|
@@ -123,7 +123,7 @@ const CreatableSelectInput = props => {
|
|
|
123
123
|
// state as an array instead of a boolean only.
|
|
124
124
|
// Otherwise the shapes would clash on submission, as
|
|
125
125
|
// Formik will create an array on submission anyways.
|
|
126
|
-
return props.name ?
|
|
126
|
+
return props.name ? `${props.name}.0` : undefined;
|
|
127
127
|
})()
|
|
128
128
|
},
|
|
129
129
|
persist: () => {}
|
|
@@ -131,7 +131,6 @@ const CreatableSelectInput = props => {
|
|
|
131
131
|
props.onBlur && props.onBlur(event);
|
|
132
132
|
} : undefined,
|
|
133
133
|
onChange: (value, info) => {
|
|
134
|
-
var _props$onChange;
|
|
135
134
|
// selectedOptions is either an array, or a single option, or null
|
|
136
135
|
// depending on whether we're in multi-mode or not (isMulti)
|
|
137
136
|
|
|
@@ -139,7 +138,7 @@ const CreatableSelectInput = props => {
|
|
|
139
138
|
if (props.isMulti && !newValue) {
|
|
140
139
|
newValue = [];
|
|
141
140
|
}
|
|
142
|
-
|
|
141
|
+
props.onChange?.({
|
|
143
142
|
target: {
|
|
144
143
|
id: props.id,
|
|
145
144
|
name: props.name,
|
|
@@ -107,7 +107,7 @@ const CreatableSelectInput = props => {
|
|
|
107
107
|
// state as an array instead of a boolean only.
|
|
108
108
|
// Otherwise the shapes would clash on submission, as
|
|
109
109
|
// Formik will create an array on submission anyways.
|
|
110
|
-
return props.name ?
|
|
110
|
+
return props.name ? `${props.name}.0` : undefined;
|
|
111
111
|
})()
|
|
112
112
|
},
|
|
113
113
|
persist: () => {}
|
|
@@ -115,7 +115,6 @@ const CreatableSelectInput = props => {
|
|
|
115
115
|
props.onBlur && props.onBlur(event);
|
|
116
116
|
} : undefined,
|
|
117
117
|
onChange: (value, info) => {
|
|
118
|
-
var _props$onChange;
|
|
119
118
|
// selectedOptions is either an array, or a single option, or null
|
|
120
119
|
// depending on whether we're in multi-mode or not (isMulti)
|
|
121
120
|
|
|
@@ -123,7 +122,7 @@ const CreatableSelectInput = props => {
|
|
|
123
122
|
if (props.isMulti && !newValue) {
|
|
124
123
|
newValue = [];
|
|
125
124
|
}
|
|
126
|
-
|
|
125
|
+
props.onChange?.({
|
|
127
126
|
target: {
|
|
128
127
|
id: props.id,
|
|
129
128
|
name: props.name,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/creatable-select-input",
|
|
3
3
|
"description": "An input component getting a selection from the user, and where options can also be created by the user.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.12.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/icons": "19.
|
|
27
|
-
"@commercetools-uikit/select-utils": "19.
|
|
28
|
-
"@commercetools-uikit/spacings": "19.
|
|
29
|
-
"@commercetools-uikit/text": "19.
|
|
30
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.12.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.12.0",
|
|
26
|
+
"@commercetools-uikit/icons": "19.12.0",
|
|
27
|
+
"@commercetools-uikit/select-utils": "19.12.0",
|
|
28
|
+
"@commercetools-uikit/spacings": "19.12.0",
|
|
29
|
+
"@commercetools-uikit/text": "19.12.0",
|
|
30
|
+
"@commercetools-uikit/utils": "19.12.0",
|
|
31
31
|
"@emotion/react": "^11.10.5",
|
|
32
32
|
"@emotion/styled": "^11.10.5",
|
|
33
33
|
"lodash": "4.17.21",
|