Skip to content

Commit 46de181

Browse files
committed
refactor(aria/combobox): Add accessors for pattern properties
1 parent edf4806 commit 46de181

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/aria/combobox/combobox.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,15 @@ export class Combobox<V> {
8282
/** The value of the first matching item in the popup. */
8383
readonly firstMatch = input<V | undefined>(undefined);
8484

85+
/** The id of the current active item. */
86+
readonly activedescendant = computed(() => this._pattern.activedescendant());
87+
8588
/** Whether the combobox is expanded. */
8689
readonly expanded = computed(() => this._pattern.expanded());
8790

91+
/** The currently highlighted item in the combobox. */
92+
readonly highlightedItem = computed(() => this._pattern.highlightedItem());
93+
8894
/** Input element connected to the combobox, if any. */
8995
readonly inputElement = computed(() => this._pattern.inputs.inputEl());
9096

0 commit comments

Comments
 (0)