Skip to content

Commit 1150865

Browse files
committed
refactor(aria/grid): Add accessors for pattern properties
1 parent 0c601fa commit 1150865

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/aria/grid/grid.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ export class Grid {
8686
/** Whether enable range selections (with modifier keys or dragging). */
8787
readonly enableRangeSelection = input(false, {transform: booleanAttribute});
8888

89+
/** Whether the user is currently dragging to select a range of cells. */
90+
readonly dragging = computed(() => this._pattern.dragging());
91+
92+
/** Whether the focus is in the grid. */
93+
readonly isFocused = computed(() => this._pattern.isFocused());
94+
8995
/** The UI pattern for the grid. */
9096
readonly _pattern = new GridPattern({
9197
...this,

0 commit comments

Comments
 (0)