Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/components/combo_box/__snapshots__/combo_box.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ Array [
Pre
</span>
</span>
1
<span
class="eui-textTruncate"
>
1
</span>
</span>
<button
aria-label="Remove 1 from selection in this group"
Expand All @@ -462,7 +466,11 @@ Array [
<span
class="euiBadge__text emotion-euiBadge__text"
>
2
<span
class="eui-textTruncate"
>
2
</span>
<span
class="euiComboBoxPill__append"
>
Expand Down Expand Up @@ -504,7 +512,11 @@ exports[`props option.prepend & option.append renders in single selection 1`] =
Pre
</span>
</span>
1
<span
class="eui-textTruncate"
>
1
</span>
</span>
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

&--plainText {
@include euiFont;
@include euiTextTruncate;

line-height: $euiSizeL;
font-size: $euiFontSizeS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ export class EuiComboBoxPill<T> extends Component<EuiComboBoxPillProps<T>> {
{option.prepend && (
<span className="euiComboBoxPill__prepend">{option.prepend}</span>
)}
{children}
{/* .euiBadge__text normally text truncates, but because we set it to flex to align prepend/append
it breaks and we need to restore it manually
*/}
<span className="eui-textTruncate">{children}</span>
{option.append && (
<span className="euiComboBoxPill__append">{option.append}</span>
)}
Expand Down
5 changes: 5 additions & 0 deletions upcoming_changelogs/7193.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**Bug fixes**

- Fixed `EuiComboBox` to correctly truncate selected items when displayed as pills and plain text