Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-select/src/internal/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // @flow
/** @jsx jsx */
import { jsx } from '@emotion/react';
import React, { type Element } from 'react';
import useScrollCapture from './useScrollCapture';
import useScrollLock from './useScrollLock';
type RefCallback<T> = (T | null) => void;
type Props = {
children: (RefCallback<HTMLElement>) => Element<*>,
lockEnabled: boolean,
captureEnabled: boolean,
onBottomArrive?: (event: SyntheticEvent<HTMLElement>) => void,
onBottomLeave?: (event: SyntheticEvent<HTMLElement>) => void,
onTopArrive?: (event: SyntheticEvent<HTMLElement>) => void,
onTopLeave?: (event: SyntheticEvent<HTMLElement>) => void,
};
const blurSelectInput = () =>
document.activeElement && document.activeElement.blur();
export default function ScrollManager({
children,
lockEnabled,
captureEnabled = true,
onBottomArrive,
onBottomLeave,
onTopArrive,
onTopLeave,
}: Props) {
const setScrollCaptureTarget = useScrollCapture({
isEnabled: captureEnabled,
onBottomArrive,
onBottomLeave,
onTopArrive,
onTopLeave,
});
const setScrollLockTarget = useScrollLock({ isEnabled: lockEnabled });
const targetRef = element => {
setScrollCaptureTarget(element);
setScrollLockTarget(element);
};
return (
<React.Fragment>
{lockEnabled && (
<div
onClick={blurSelectInput}
css={{ position: 'fixed', left: 0, bottom: 0, right: 0, top: 0 }}
/>
)}
{children(targetRef)}
</React.Fragment>
);
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |