Skip to content

Commit 76d1223

Browse files
committed
fixup! try removing controllers to see how that simplifies things
1 parent 7860141 commit 76d1223

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/cdk-experimental/listbox/listbox.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import {toSignal} from '@angular/core/rxjs-interop';
4848
'[attr.aria-orientation]': 'pattern.orientation()',
4949
'[attr.aria-multiselectable]': 'pattern.multiselectable()',
5050
'[attr.aria-activedescendant]': 'pattern.activedescendant()',
51-
'(focusin)': 'pattern.onFocus()',
5251
'(keydown)': 'pattern.onKeydown($event)',
5352
'(mousedown)': 'pattern.onMousedown($event)',
5453
},
@@ -62,7 +61,7 @@ export class CdkListbox {
6261

6362
/** A signal wrapper for directionality. */
6463
protected directionality = toSignal(this._dir.change, {
65-
initialValue: 'ltr',
64+
initialValue: this._dir.value,
6665
});
6766

6867
/** The Option UIPatterns of the child CdkOptions. */

src/cdk-experimental/ui-patterns/behaviors/event-manager/event-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export abstract class EventManager<T extends Event> {
100100
submanager.handle(event);
101101
}
102102
for (const config of this.getHandlersForKey(event)) {
103-
await config.handler(event);
103+
config.handler(event);
104104
if (config.stopPropagation) {
105105
event.stopPropagation();
106106
}

src/cdk-experimental/ui-patterns/behaviors/list-typeahead/list-typeahead.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class ListTypeahead<T extends ListTypeaheadItem> {
6161
this.timeout = setTimeout(() => {
6262
this.query.set('');
6363
this.anchorIndex.set(null);
64-
}, this.inputs.delay() * 1000);
64+
}, this.inputs.typeaheadDelay() * 1000);
6565
}
6666

6767
/**

src/cdk-experimental/ui-patterns/listbox/listbox.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ export class ListboxPattern {
9292
keydown = computed(() => {
9393
const manager = new KeyboardEventManager();
9494

95+
console.log('prev key:', this.prevKey());
96+
console.log('next key:', this.nextKey());
97+
9598
if (!this.followFocus()) {
9699
manager
97100
.on(this.prevKey, () => this.prev())
@@ -178,6 +181,7 @@ export class ListboxPattern {
178181

179182
/** Handles keydown events for the listbox. */
180183
onKeydown(event: KeyboardEvent) {
184+
console.log(this.orientation());
181185
if (!this.disabled()) {
182186
this.keydown().handle(event);
183187
}

0 commit comments

Comments
 (0)