@@ -158,7 +158,7 @@ export interface AccordionTriggerInputs
158158/** A pattern controls the expansion state of an accordion. */
159159export class AccordionTriggerPattern implements ListNavigationItem , ListFocusItem , ExpansionItem {
160160 /** A unique identifier for this trigger. */
161- readonly id : SignalLike < string > = ( ) => this . inputs . id ( ) ;
161+ readonly id : SignalLike < string > ; // set from inputs
162162
163163 /** A reference to the trigger element. */
164164 readonly element : SignalLike < HTMLElement > = ( ) => this . inputs . element ( ) ! ;
@@ -167,13 +167,13 @@ export class AccordionTriggerPattern implements ListNavigationItem, ListFocusIte
167167 readonly expandable : SignalLike < boolean > = ( ) => true ;
168168
169169 /** Whether the corresponding panel is expanded. */
170- readonly expanded : WritableSignalLike < boolean > ;
170+ readonly expanded : WritableSignalLike < boolean > ; // set from inputs
171171
172172 /** Whether the trigger is active. */
173173 readonly active = computed ( ( ) => this . inputs . accordionGroup ( ) . inputs . activeItem ( ) === this ) ;
174174
175175 /** Id of the accordion panel controlled by the trigger. */
176- readonly controls = computed ( ( ) => this . inputs . accordionPanelId ( ) ) ;
176+ readonly controls : SignalLike < string > ; // set from inputs
177177
178178 /** The tabindex of the trigger. */
179179 readonly tabIndex = computed ( ( ) =>
@@ -191,7 +191,9 @@ export class AccordionTriggerPattern implements ListNavigationItem, ListFocusIte
191191 ) ;
192192
193193 constructor ( readonly inputs : AccordionTriggerInputs ) {
194+ this . id = inputs . id ;
194195 this . expanded = inputs . expanded ;
196+ this . controls = inputs . accordionPanelId ;
195197 }
196198
197199 /** Opens the accordion panel. */
0 commit comments