@geckoui/geckoui 1.6.1 → 1.6.2
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4617,7 +4617,7 @@ var SelectOption = (_a) => {
|
|
|
4617
4617
|
const focused = !isNil_default(focusedOption) && isEqual_default(focusedOption == null ? void 0 : focusedOption.value, value);
|
|
4618
4618
|
(0, import_react33.useEffect)(() => {
|
|
4619
4619
|
if (!ref.current || !menuScrollContainerRef.current) return;
|
|
4620
|
-
if ((focusedOption == null ? void 0 : focusedOption.focusType)
|
|
4620
|
+
if ((focusedOption == null ? void 0 : focusedOption.focusType) !== "mouse" && focused) {
|
|
4621
4621
|
const scrollContainer = menuScrollContainerRef.current;
|
|
4622
4622
|
const optionRect = ref.current.getBoundingClientRect();
|
|
4623
4623
|
const containerRect = scrollContainer.getBoundingClientRect();
|
|
@@ -4629,7 +4629,7 @@ var SelectOption = (_a) => {
|
|
|
4629
4629
|
const optionHeight = ref.current.clientHeight;
|
|
4630
4630
|
scrollContainer.scrollTo({
|
|
4631
4631
|
top: optionTop - containerHeight / 2 + optionHeight / 2,
|
|
4632
|
-
behavior: "smooth"
|
|
4632
|
+
behavior: (focusedOption == null ? void 0 : focusedOption.focusType) === "initial" ? "auto" : "smooth"
|
|
4633
4633
|
});
|
|
4634
4634
|
}
|
|
4635
4635
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -4529,7 +4529,7 @@ var SelectOption = (_a) => {
|
|
|
4529
4529
|
const focused = !isNil_default(focusedOption) && isEqual_default(focusedOption == null ? void 0 : focusedOption.value, value);
|
|
4530
4530
|
useEffect8(() => {
|
|
4531
4531
|
if (!ref.current || !menuScrollContainerRef.current) return;
|
|
4532
|
-
if ((focusedOption == null ? void 0 : focusedOption.focusType)
|
|
4532
|
+
if ((focusedOption == null ? void 0 : focusedOption.focusType) !== "mouse" && focused) {
|
|
4533
4533
|
const scrollContainer = menuScrollContainerRef.current;
|
|
4534
4534
|
const optionRect = ref.current.getBoundingClientRect();
|
|
4535
4535
|
const containerRect = scrollContainer.getBoundingClientRect();
|
|
@@ -4541,7 +4541,7 @@ var SelectOption = (_a) => {
|
|
|
4541
4541
|
const optionHeight = ref.current.clientHeight;
|
|
4542
4542
|
scrollContainer.scrollTo({
|
|
4543
4543
|
top: optionTop - containerHeight / 2 + optionHeight / 2,
|
|
4544
|
-
behavior: "smooth"
|
|
4544
|
+
behavior: (focusedOption == null ? void 0 : focusedOption.focusType) === "initial" ? "auto" : "smooth"
|
|
4545
4545
|
});
|
|
4546
4546
|
}
|
|
4547
4547
|
}
|