Skip to content

Commit 6cf527f

Browse files
authored
fix(aria/tree): recursive textDirection getter (#33337)
Fixes that the `textDirection` was recursively calling itself rather than `inputs.textDirection`.
1 parent ee370a0 commit 6cf527f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/aria/private/tree/tree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class TreePattern<V> implements TreeInputs<V> {
178178
readonly followFocus = computed(() => this.inputs.selectionMode() === 'follow');
179179

180180
/** Whether the tree direction is RTL. */
181-
readonly isRtl = computed(() => this.inputs.textDirection() === 'rtl');
181+
readonly isRtl = computed(() => this.textDirection() === 'rtl');
182182

183183
/** The key for navigating to the previous item. */
184184
readonly prevKey = computed(() => {
@@ -348,7 +348,7 @@ export class TreePattern<V> implements TreeInputs<V> {
348348
readonly orientation: SignalLike<'vertical' | 'horizontal'> = () => this.inputs.orientation();
349349

350350
/** The text direction of the tree. */
351-
readonly textDirection: SignalLike<'ltr' | 'rtl'> = () => this.textDirection();
351+
readonly textDirection: SignalLike<'ltr' | 'rtl'> = () => this.inputs.textDirection();
352352

353353
/** Whether multiple items can be selected at the same time. */
354354
readonly multi: SignalLike<boolean> = computed(() => (this.nav() ? false : this.inputs.multi()));

0 commit comments

Comments
 (0)