OpenClosePopupStrategy

A contract for a strategy that determines when a popup should open or close.

The strategy will be informed about some target element, which represents the element that the popup is anchored to. In other words, interaction with that element is what should trigger the popup to open or close.

Children classes should implement this and fire emitRequest when they want to request opening or closing the popup.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A readable convenience property that queries the underlying state flow.

Link copied to clipboard
val requestFlow: StateFlow<OpenClose>

Functions

Link copied to clipboard
open fun init(targetElement: HTMLElement)

Initialize this strategy with some target element.

Link copied to clipboard
Link copied to clipboard
open fun reset()

Release resources (if necessary) allocated by init.