Fix bottom-up dropdown positioning

This commit is contained in:
Gregory Schier
2023-11-22 09:35:56 -08:00
parent 81a8276e2b
commit 7a72920e66
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
"@tauri-apps/cli": "^1.5.4", "@tauri-apps/cli": "^1.5.6",
"@types/node": "^18.7.10", "@types/node": "^18.7.10",
"@types/papaparse": "^5.3.7", "@types/papaparse": "^5.3.7",
"@types/parse-color": "^1.0.1", "@types/parse-color": "^1.0.1",

View File

@@ -300,7 +300,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle'>, MenuPro
const upsideDown = vSpaceRemaining < 200; const upsideDown = vSpaceRemaining < 200;
const containerStyles = { const containerStyles = {
top: !upsideDown ? top : undefined, top: !upsideDown ? top : undefined,
bottom: upsideDown ? top : undefined, bottom: upsideDown ? docRect.height - top : undefined,
right: onRight ? docRect.width - triggerShape?.right : undefined, right: onRight ? docRect.width - triggerShape?.right : undefined,
left: !onRight ? triggerShape?.left : undefined, left: !onRight ? triggerShape?.left : undefined,
}; };