Skip to content

Commit e92c7db

Browse files
committed
fix: remove duplicate keyboard delegate in gridlist
1 parent bc57b0c commit e92c7db

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/react-aria-components/src/GridList.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ function GridListInner<T extends object>({props, collection, gridListRef: ref}:
130130
disabledBehavior,
131131
layoutDelegate,
132132
layout,
133-
direction
133+
direction,
134+
orientation
134135
})
135-
), [collection, ref, layout, disabledKeys, disabledBehavior, layoutDelegate, collator, direction]);
136+
), [collection, ref, layout, disabledKeys, disabledBehavior, layoutDelegate, collator, direction, orientation]);
136137

137138
let {gridProps} = useGridList({
138139
...props,
@@ -187,13 +188,6 @@ function GridListInner<T extends object>({props, collection, gridListRef: ref}:
187188
selectionManager
188189
});
189190

190-
let keyboardDelegate = new ListKeyboardDelegate({
191-
collection,
192-
orientation,
193-
disabledKeys: selectionManager.disabledKeys,
194-
disabledBehavior: selectionManager.disabledBehavior,
195-
ref
196-
});
197191
let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {layout, direction});
198192
droppableCollection = dragAndDropHooks.useDroppableCollection!({
199193
keyboardDelegate,

0 commit comments

Comments
 (0)