@homebound/beam 2.416.4 → 2.416.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9529,6 +9529,7 @@ function Option(props) {
|
|
|
9529
9529
|
}
|
|
9530
9530
|
|
|
9531
9531
|
// src/inputs/internal/VirtualizedOptions.tsx
|
|
9532
|
+
import { getInteractionModality } from "@react-aria/interactions";
|
|
9532
9533
|
import { useEffect as useEffect12, useRef as useRef21 } from "react";
|
|
9533
9534
|
import { Virtuoso } from "react-virtuoso";
|
|
9534
9535
|
|
|
@@ -9780,7 +9781,7 @@ function VirtualizedOptions(props) {
|
|
|
9780
9781
|
const selectedItem = state.selectionManager.selectedKeys.size > 0 ? state.collection.getItem([...state.selectionManager.selectedKeys.values()][0]) : void 0;
|
|
9781
9782
|
useEffect12(
|
|
9782
9783
|
() => {
|
|
9783
|
-
if (scrollOnFocus && virtuosoRef.current && focusedItem?.index) {
|
|
9784
|
+
if (!!scrollOnFocus && getInteractionModality() === "keyboard" && virtuosoRef.current && focusedItem?.index) {
|
|
9784
9785
|
virtuosoRef.current.scrollToIndex({ index: focusedItem.index, align: "center" });
|
|
9785
9786
|
}
|
|
9786
9787
|
},
|