Modals: possible to align with right side of layout and detect open/close state?
ssuess last edited by ssuess
Hi, I am starting to work with modals, and I am looking for a way to have it be maximized UNLESS the left side drawer is open, in which case fill the right side only (as if it were full screen). Are there properties built in that allow this? I can’t find them in the docs or I am possibly missing something obvious. Thanks!
a47ae last edited by
For the first part, you could bind the
maximizedprop of the modal to a computed property. Then listen for the events of the sidebar and change accordingly. But it is tricky to fill the right space because modals are absolutely positioned. You could try to use CSS
calcto compute the width (something like
calc(100vw - $leftSidebarWidth).