I've developed a custom dropdown feature using Vue 2 and TypeScript to meet our specific requirements (without relying on jQuery).
The dropdown functions correctly, opening the options list downwards when the main box is clicked.
One enhancement I am seeking involves dynamically adjusting the position of the options list. When the screen reaches its end, causing a scrollbar to appear or increase in height due to the dropdown, I want the options list to open upwards instead. How can I implement this functionality?
Dropdown Open & Dropdown Closed
Here is a snippet of my code:
(Insert code here)