Skip to content

Commit 51128f8

Browse files
committed
tweak grid
1 parent 7f532a6 commit 51128f8

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

src/aria/grid/grid.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,12 @@ export class Grid {
7777
/** The wrapping behavior for keyboard navigation along the column axis. */
7878
readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');
7979

80-
/** The currently active cell. */
81-
readonly activeCell = computed(() => this._pattern.activeCell());
82-
8380
/** Whether the user is currently dragging to select a range of cells. */
8481
readonly dragging = computed(() => this._pattern.dragging());
8582

8683
/** Whether the focus is in the grid. */
8784
readonly isFocused = computed(() => this._pattern.isFocused());
8885

89-
/** Whether to pause grid navigation. */
90-
readonly pauseNavigation = computed(() => this._pattern.pauseNavigation());
91-
9286
/** The UI pattern for the grid. */
9387
readonly _pattern = new GridPattern({
9488
...this,

src/aria/tree/tree.ts

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ export class Tree<V> {
220220
exportAs: 'ngTreeItem',
221221
host: {
222222
'class': 'ng-treeitem',
223-
'[attr.data-active]': 'active()',
223+
'[attr.data-active]': '_pattern.active()',
224224
'role': 'treeitem',
225225
'[id]': '_pattern.id()',
226-
'[attr.aria-expanded]': 'expanded()',
227-
'[attr.aria-selected]': 'selected()',
226+
'[attr.aria-expanded]': '_pattern.expandable() ? _pattern.expanded() : null',
227+
'[attr.aria-selected]': '_pattern.selected()',
228228
'[attr.aria-current]': '_pattern.current()',
229229
'[attr.aria-disabled]': '_pattern.disabled()',
230-
'[attr.aria-level]': 'level()',
230+
'[attr.aria-level]': '_pattern.level()',
231231
'[attr.aria-setsize]': '_pattern.setsize()',
232232
'[attr.aria-posinset]': '_pattern.posinset()',
233233
'[attr.tabindex]': '_pattern.tabIndex()',
@@ -272,23 +272,6 @@ export class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestr
272272
return (this.parent() as TreeItemGroup<V>).ownedBy().tree();
273273
});
274274

275-
/** Whether the item is active. */
276-
readonly active = computed(() => this._pattern.active());
277-
278-
/** Whether this item is currently expanded, returning null if not expandable. */
279-
readonly expanded = computed(() =>
280-
this._pattern.expandable() ? this._pattern.expanded() : null,
281-
);
282-
283-
/** The level of the current item in a tree. */
284-
readonly level = computed(() => this._pattern.level());
285-
286-
/** Whether the item is selected. */
287-
readonly selected = computed(() => this._pattern.selected());
288-
289-
/** Whether this item is visible due to all of its parents being expanded. */
290-
readonly visible = computed(() => this._pattern.visible());
291-
292275
/** The UI pattern for this item. */
293276
_pattern: TreeItemPattern<V>;
294277

0 commit comments

Comments
 (0)