From c606b1dd45152779e1a38eed3a29c572bdb7b7d0 Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 9 Aug 2023 13:07:45 +0200 Subject: [PATCH] test fixes --- src/internal/components/dropdown/dropdown-fit-handler.ts | 3 +-- src/internal/components/dropdown/styles.scss | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/internal/components/dropdown/dropdown-fit-handler.ts b/src/internal/components/dropdown/dropdown-fit-handler.ts index b6f13b40a6..7f49f9e871 100644 --- a/src/internal/components/dropdown/dropdown-fit-handler.ts +++ b/src/internal/components/dropdown/dropdown-fit-handler.ts @@ -131,8 +131,7 @@ export const getDropdownPosition = ( const availableSpace = getAvailableSpace(trigger, dropdown, overflowParents, stretchWidth, stretchHeight, isMobile); const triggerWidth = trigger.getBoundingClientRect().width; const minWidth = desiredMinWidth ? Math.min(triggerWidth, desiredMinWidth) : triggerWidth; - const maxWidth = - stretchBeyondTriggerWidth && desiredMaxWidth ? Math.max(desiredMaxWidth, triggerWidth) : Number.MAX_VALUE; + const maxWidth = stretchBeyondTriggerWidth ? Math.max(465, triggerWidth) : Number.MAX_VALUE; const requiredWidth = dropdown.getBoundingClientRect().width; // dropdown should not be smaller than the trigger const idealWidth = Math.min(Math.max(requiredWidth, minWidth), maxWidth); diff --git a/src/internal/components/dropdown/styles.scss b/src/internal/components/dropdown/styles.scss index ead7f620e2..dfa9713b51 100644 --- a/src/internal/components/dropdown/styles.scss +++ b/src/internal/components/dropdown/styles.scss @@ -71,8 +71,8 @@ min-width: 100%; } &.stretch-beyond-trigger-width { - width: 100%; - min-width: 465px; + width: max-content; + max-width: 465px; } &.hide-upper-border > .dropdown-content-wrapper { border-top: none;