Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
uibuilder.cmshelp.dk
httpdocs
node_modules
@mui
utils
getReactElementRef
File Content:
getReactElementRef.js
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getReactElementRef; var React = _interopRequireWildcard(require("react")); /** * Returns the ref of a React element handling differences between React 19 and older versions. * It will throw runtime error if the element is not a valid React element. * * @param element React.ReactElement * @returns React.Ref<any> | null */ function getReactElementRef(element) { // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions if (parseInt(React.version, 10) >= 19) { return element?.props?.ref || null; } // @ts-expect-error element.ref is not included in the ReactElement type // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189 return element?.ref || null; }
Edit
Download
Unzip
Chmod
Delete