Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function MoreDropdown({ listKey, measureRef, isFullWidth, onFullWidthToggle }) {
let { width } = useMeasure(measureRef);
const onReset = useReset(listKey);
const TableIcon = isFullWidth ? FoldIcon : UnfoldIcon;
const tableToggleIsAvailable = width > CONTAINER_WIDTH + CONTAINER_GUTTER * 2;
const items = [
{
content: 'Reset filters, cols, etc.',
icon: ,
id: 'ks-list-dropdown-reset', // for cypress tests
onClick: onReset,
},
{
content: isFullWidth ? 'Collapse table' : 'Expand table',
icon: ,
isDisabled: !tableToggleIsAvailable,
onClick: onFullWidthToggle,
const PopperRender = forwardRef(({ scheduleUpdate, editorState, style, children }, ref) => {
let { fragment } = editorState;
let shouldShowToolbar = fragment.text !== '';
let containerRef = useRef(null);
let snapshot = useMeasure(containerRef);
useLayoutEffect(() => {
if (shouldShowToolbar) {
scheduleUpdate();
}
}, [scheduleUpdate, editorState, snapshot, shouldShowToolbar]);
return createPortal(
<div> {
applyRef(ref, node);
applyRef(containerRef, node);
}}
style={style}
css={{</div>