So I have a dropdown and am trying to give it a dynamic height; how would this be possible using mithril.js?
This is what I have tried so far: This is a snippet of code where I am trying to give the list a dynamic height. The end goal is to have the list a dynamic height so that on a fixed navbar I can make it scrollable using overflow-y:scroll
.
var h = window.innerHeight || document.documentElement.clientHeight|| document.body.clientHeight;
m("ul.nav-dropdown-menu", {
style: { height: h+"px" },
className: ctrl.isOpen ? 'is-open' : 'is-closed',
});