Function toggleDetails
- toggleDetails(
details: HTMLDetailsElement,
-?: ToggleDetails,
): ActionReturn<ToggleDetails> Parameters
- details: HTMLDetailsElement
The
details
element. Optional
-: ToggleDetailsOptions.
Returns ActionReturn<ToggleDetails>
Lifecycle functions.
- details: HTMLDetailsElement
Provides a toggle action for
details
HTML elements. The boolean store when provided controls open / closed state. Animation is accomplished using WAAPI controlling the height of the details element. It should be noted that this animation may cause layout thrashing (reflows) depending on the amount of DOM elements on the page though this doesn't occur under most situations. Animation can be toggled on / off with theanimate
option.It is not necessary to bind the store to the
open
attribute of the associated details element.When the action is triggered to close the details element a data attribute
closing
is set totrue
. This allows any associated closing transitions to start immediately.