@bitrise/bitkit 13.219.0 → 13.220.0
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/package.json
CHANGED
|
@@ -354,13 +354,19 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
354
354
|
const searchElement = search === false ? null : search || <DropdownSearch />;
|
|
355
355
|
const buttonId = useId();
|
|
356
356
|
|
|
357
|
+
const onScrolledToBottomRef = useRef(onScrolledToBottom);
|
|
358
|
+
|
|
359
|
+
useEffect(() => {
|
|
360
|
+
onScrolledToBottomRef.current = onScrolledToBottom;
|
|
361
|
+
}, [onScrolledToBottom]);
|
|
362
|
+
|
|
357
363
|
const internalRef = useCallback((node: HTMLDivElement | null) => {
|
|
358
364
|
if (!node) return;
|
|
359
365
|
|
|
360
366
|
const handleScroll = () => {
|
|
361
367
|
const { scrollTop, scrollHeight, clientHeight } = node;
|
|
362
368
|
if (scrollTop + clientHeight >= scrollHeight) {
|
|
363
|
-
|
|
369
|
+
onScrolledToBottomRef.current?.();
|
|
364
370
|
}
|
|
365
371
|
};
|
|
366
372
|
|