Skip to content

Commit 52c298e

Browse files
committed
matchTriggerWidth = true
1 parent e2b36da commit 52c298e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/boxel-ui/addon/src/components/select/index.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const BoxelSelect: TemplateOnlyComponent<Signature> = <template>
3333
@dropdownClass={{cn 'boxel-select__dropdown' @dropdownClass}}
3434
@triggerComponent={{@triggerComponent}}
3535
@disabled={{@disabled}}
36-
@matchTriggerWidth={{false}}
36+
@matchTriggerWidth={{@matchTriggerWidth}}
3737
@eventType='click'
3838
@searchEnabled={{@searchEnabled}}
3939
@beforeOptionsComponent={{component BeforeOptions autofocus=false}}

packages/boxel-ui/addon/src/components/select/usage.gts

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default class BoxelSelectUsage extends Component {
3333
@tracked disabled = false;
3434
@tracked searchField = '';
3535
@tracked searchEnabled = false;
36+
@tracked matchTriggerWidth = true;
3637

3738
@cssVariable({ cssClassName: 'boxel-select__dropdown' })
3839
declare boxelSelectCurrentColor: CSSVariableInfo;
@@ -66,6 +67,7 @@ export default class BoxelSelectUsage extends Component {
6667
@renderInPlace={{this.renderInPlace}}
6768
@disabled={{this.disabled}}
6869
@dropdownClass='boxel-select-usage'
70+
@matchTriggerWidth={{this.matchTriggerWidth}}
6971
aria-label={{this.placeholder}}
7072
as |item|
7173
>
@@ -116,6 +118,13 @@ export default class BoxelSelectUsage extends Component {
116118
@onInput={{fn (mut this.renderInPlace)}}
117119
@description='When passed true, the content will render next to the trigger instead of being placed in the root of the body'
118120
/>
121+
<Args.Bool
122+
@name='matchTriggerWidth'
123+
@defaultValue={{true}}
124+
@value={{this.matchTriggerWidth}}
125+
@onInput={{fn (mut this.matchTriggerWidth)}}
126+
@description='Allow dropdown width to match trigger width'
127+
/>
119128
<Args.Bool
120129
@name='disabled'
121130
@defaultValue={{false}}

0 commit comments

Comments
 (0)