Skip to content

Commit

Permalink
fix: typo in Dropdown.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
luceos authored Dec 4, 2024
1 parent 097a542 commit 6d88c99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/core/js/src/common/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ export default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttr

const top = $menu.offset()?.top ?? 0;
const height = $menu.height() ?? 0;
const windowSrollTop = $(window).scrollTop() ?? 0;
const windowScrollTop = $(window).scrollTop() ?? 0;
const windowHeight = $(window).height() ?? 0;

$menu.removeClass('Dropdown-menu--top Dropdown-menu--right');

$menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);
$menu.toggleClass('Dropdown-menu--top', top + height > windowScrollTop + windowHeight);

if (($menu.offset()?.top || 0) < 0) {
$menu.removeClass('Dropdown-menu--top');
Expand Down

0 comments on commit 6d88c99

Please sign in to comment.