Skip to content

Commit

Permalink
chore(select): do not line-wrap selected option
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Nov 10, 2024
1 parent ceb94d9 commit 3fa3869
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/form/SelectedOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function SelectedOption(props: SelectedOptionProps): ReactElement {
disableAddon,
option,
className,
disableWrap = true,
disablePadding = true,
placeholder,
...remaining
Expand All @@ -44,6 +45,7 @@ export function SelectedOption(props: SelectedOptionProps): ReactElement {
<Box
{...remaining}
className={cnb("rmd-selected-option", textField(), className)}
disableWrap={disableWrap}
disablePadding={disablePadding}
>
{!disableAddon && option?.leftAddon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ exports[`Select should apply the correct styling, HTMLAttributes, and allow a re
tabindex="0"
>
<div
class="rmd-box rmd-box--gap rmd-box--wrap rmd-selected-option rmd-text-field"
class="rmd-box rmd-box--gap rmd-selected-option rmd-text-field"
data-testid="selected"
/>
<input
Expand Down Expand Up @@ -262,7 +262,7 @@ exports[`Select should apply the correct styling, HTMLAttributes, and allow a re
tabindex="0"
>
<div
class="rmd-box rmd-box--gap rmd-box--wrap rmd-selected-option rmd-text-field"
class="rmd-box rmd-box--gap rmd-selected-option rmd-text-field"
data-testid="selected"
/>
<input
Expand Down Expand Up @@ -453,7 +453,7 @@ exports[`Select should automatically pull options from the children and update w

exports[`Select should include the leftAddon of the selected option unless disableOptionAddon is true 1`] = `
<div
class="rmd-box rmd-box--gap rmd-box--wrap rmd-selected-option rmd-text-field"
class="rmd-box rmd-box--gap rmd-selected-option rmd-text-field"
data-testid="selected"
>
<span
Expand All @@ -473,7 +473,7 @@ exports[`Select should include the leftAddon of the selected option unless disab

exports[`Select should include the leftAddon of the selected option unless disableOptionAddon is true 2`] = `
<div
class="rmd-box rmd-box--gap rmd-box--wrap rmd-selected-option rmd-text-field"
class="rmd-box rmd-box--gap rmd-selected-option rmd-text-field"
data-testid="selected"
>
<span
Expand Down

0 comments on commit 3fa3869

Please sign in to comment.