From 625ebbaafcc93ad2802cb36559a5d769fb4e1556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Y=C3=BCksel?= Date: Mon, 3 Jun 2024 11:11:35 +0000 Subject: [PATCH] fix(create-select-styles): preserve default behavior for multi select (#2833) * fix(create-select-styles): preserve default behavior for multi * chore(select-utils): add changeset --- .changeset/forty-tips-deny.md | 5 +++++ .../inputs/select-utils/src/create-select-styles.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/forty-tips-deny.md diff --git a/.changeset/forty-tips-deny.md b/.changeset/forty-tips-deny.md new file mode 100644 index 0000000000..2012b046d6 --- /dev/null +++ b/.changeset/forty-tips-deny.md @@ -0,0 +1,5 @@ +--- +'@commercetools-uikit/select-utils': patch +--- + +Allow select inputs with multiple items to wrap. diff --git a/packages/components/inputs/select-utils/src/create-select-styles.ts b/packages/components/inputs/select-utils/src/create-select-styles.ts index 11bc776091..85d0afbd05 100644 --- a/packages/components/inputs/select-utils/src/create-select-styles.ts +++ b/packages/components/inputs/select-utils/src/create-select-styles.ts @@ -372,7 +372,7 @@ const placeholderStyles = (props: TProps) => (base: TBase) => { const valueContainerStyles = (props: TProps) => (base: TBase) => { return { ...base, - flexWrap: 'nowrap', + ...(!props.isMulti && { flexWrap: 'nowrap' }), padding: '0', backgroundColor: 'none', overflow: 'hidden',