Scroll to bottom for the last item

45827-project-list-dropdown-actions-cut-off
bsatarnejad 2 years ago
parent 9614093dbd
commit c88472e292
  1. 6
      frontend/src/app/core/setup/globals/global-listeners/action-menu.ts

@ -62,6 +62,12 @@ function openMenu(menu:JQuery) {
// when clicking on something, which is not the menu, close the menu
jQuery('html').on('click', { menu: menu.get(0) }, closeMenu);
});
const scrollableContainer = dropDown.scrollParent()[0];
if (scrollableContainer) {
jQuery(scrollableContainer).animate({
scrollTop: scrollableContainer.scrollHeight,
}, 150);
}
dropDown.addClass('open');
}
}

Loading…
Cancel
Save