We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 046e1a2 commit 963b4baCopy full SHA for 963b4ba
1 file changed
src/aria/menu/menu-bar.ts
@@ -104,7 +104,7 @@ export class MenuBar<V> {
104
readonly _pattern: MenuBarPattern<V>;
105
106
/** The menu items as a writable signal. */
107
- private readonly _itemPatterns = signal<any[]>([]);
+ private readonly _itemPatterns = computed(() => this._items().map(i => i._pattern));
108
109
/** A callback function triggered when a menu item is selected. */
110
readonly itemSelected = output<V>();
@@ -123,10 +123,6 @@ export class MenuBar<V> {
123
element: computed(() => this._elementRef.nativeElement),
124
});
125
126
- afterRenderEffect(() => {
127
- this._itemPatterns.set(this._items().map(i => i._pattern));
128
- });
129
-
130
afterRenderEffect(() => {
131
this._pattern.setDefaultStateEffect();
132
0 commit comments