folkehelseinstituttet / Fhi.Frontend.Demo

MIT License
2 stars 1 forks source link

fhi-popover-menu lacks closing functionality #546

Closed robinzaal closed 5 months ago

robinzaal commented 5 months ago

The fhi-popover-menu doesn't currently have any way to programatically close it, or a way to pass in some autoclose delay options.

This can lead to some unwanted "states" in an application, where you would want to close the popover when needed, like shown below, where I need to close the popover when the dialog opens. As of now, this is impossible, and the only way to "close" an open popover is to click somewhere else on the screen.

Perhaps the user should be able to pass in the options object that's passed to [popperOptions]="popperOptions" internally?

image

Problem: Mentioned above

Solution: Add option to close pop-over programatically