diff --git a/.changeset/tender-donuts-tie.md b/.changeset/tender-donuts-tie.md new file mode 100644 index 0000000000..68ae6f6f9f --- /dev/null +++ b/.changeset/tender-donuts-tie.md @@ -0,0 +1,8 @@ +--- +'@commercetools-uikit/search-select-field': patch +'@commercetools-uikit/search-select-input': patch +'@commercetools-uikit/async-select-input': patch +'@commercetools-uikit/select-utils': patch +--- + +Improve `SearchSelectInput`, `SearchSelectField` and `AsyncSelectInput` types by using the generics of `AsyncSelect` from `react-select/async` diff --git a/packages/components/fields/search-select-field/src/search-select-field.tsx b/packages/components/fields/search-select-field/src/search-select-field.tsx index 059fad6ac3..4a4d14b3dd 100644 --- a/packages/components/fields/search-select-field/src/search-select-field.tsx +++ b/packages/components/fields/search-select-field/src/search-select-field.tsx @@ -20,13 +20,21 @@ import SearchSelectInput from '@commercetools-uikit/search-select-input'; import FieldErrors from '@commercetools-uikit/field-errors'; import FieldWarnings from '@commercetools-uikit/field-warnings'; -type ReactSelectAsyncProps = AsyncProps>; +type ReactSelectAsyncProps< + Option, + isMulti extends boolean, + Group extends GroupBase