Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
timogasda committed Aug 9, 2023
1 parent f2ce1f8 commit c606b1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/internal/components/dropdown/dropdown-fit-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/internal/components/dropdown/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c606b1d

Please sign in to comment.