@commercetools-uikit/async-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.
@@ -138,7 +138,7 @@ const AsyncCreatableSelectInput = props => {
138
138
  // state as an array instead of a boolean only.
139
139
  // Otherwise the shapes would clash on submission, as
140
140
  // Formik will create an array on submission anyways.
141
- return "".concat(props.name, ".0");
141
+ return `${props.name}.0`;
142
142
  })()
143
143
  },
144
144
  persist: () => {}
@@ -146,13 +146,12 @@ const AsyncCreatableSelectInput = props => {
146
146
  props.onBlur && props.onBlur(event);
147
147
  } : undefined,
148
148
  onChange: (value, info) => {
149
- var _props$onChange;
150
149
  // wrapping breaking changes made in react-select v3
151
150
  let newValue = value;
152
151
  if (props.isMulti && !newValue) {
153
152
  newValue = [];
154
153
  }
155
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
154
+ props.onChange?.({
156
155
  target: {
157
156
  id: props.id,
158
157
  name: props.name,
@@ -132,7 +132,7 @@ const AsyncCreatableSelectInput = props => {
132
132
  // state as an array instead of a boolean only.
133
133
  // Otherwise the shapes would clash on submission, as
134
134
  // Formik will create an array on submission anyways.
135
- return "".concat(props.name, ".0");
135
+ return `${props.name}.0`;
136
136
  })()
137
137
  },
138
138
  persist: () => {}
@@ -140,13 +140,12 @@ const AsyncCreatableSelectInput = props => {
140
140
  props.onBlur && props.onBlur(event);
141
141
  } : undefined,
142
142
  onChange: (value, info) => {
143
- var _props$onChange;
144
143
  // wrapping breaking changes made in react-select v3
145
144
  let newValue = value;
146
145
  if (props.isMulti && !newValue) {
147
146
  newValue = [];
148
147
  }
149
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
148
+ props.onChange?.({
150
149
  target: {
151
150
  id: props.id,
152
151
  name: props.name,
@@ -117,7 +117,7 @@ const AsyncCreatableSelectInput = props => {
117
117
  // state as an array instead of a boolean only.
118
118
  // Otherwise the shapes would clash on submission, as
119
119
  // Formik will create an array on submission anyways.
120
- return "".concat(props.name, ".0");
120
+ return `${props.name}.0`;
121
121
  })()
122
122
  },
123
123
  persist: () => {}
@@ -125,13 +125,12 @@ const AsyncCreatableSelectInput = props => {
125
125
  props.onBlur && props.onBlur(event);
126
126
  } : undefined,
127
127
  onChange: (value, info) => {
128
- var _props$onChange;
129
128
  // wrapping breaking changes made in react-select v3
130
129
  let newValue = value;
131
130
  if (props.isMulti && !newValue) {
132
131
  newValue = [];
133
132
  }
134
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
133
+ props.onChange?.({
135
134
  target: {
136
135
  id: props.id,
137
136
  name: props.name,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/async-creatable-select-input",
3
3
  "description": "An input component getting a selection from an asynchronously loaded list from the user, and where options can be created by the user.",
4
- "version": "19.11.0",
4
+ "version": "19.12.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "19.11.0",
25
- "@commercetools-uikit/design-system": "19.11.0",
26
- "@commercetools-uikit/icons": "19.11.0",
27
- "@commercetools-uikit/loading-spinner": "19.11.0",
28
- "@commercetools-uikit/select-utils": "19.11.0",
29
- "@commercetools-uikit/spacings": "19.11.0",
30
- "@commercetools-uikit/text": "19.11.0",
31
- "@commercetools-uikit/utils": "19.11.0",
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/loading-spinner": "19.12.0",
28
+ "@commercetools-uikit/select-utils": "19.12.0",
29
+ "@commercetools-uikit/spacings": "19.12.0",
30
+ "@commercetools-uikit/text": "19.12.0",
31
+ "@commercetools-uikit/utils": "19.12.0",
32
32
  "@emotion/is-prop-valid": "1.2.2",
33
33
  "@emotion/react": "^11.10.5",
34
34
  "@emotion/styled": "^11.10.5",