Interface IModalJsInterop
- Namespace
- BlazOrbit.Components.Layout
- Assembly
- BlazOrbit.dll
JS interop contract for the modal/dialog/drawer module.
public interface IModalJsInterop
Methods
LockScrollAsync()
Locks document scroll while a modal is open.
ValueTask LockScrollAsync()
Returns
- ValueTask
ReleaseFocusAsync(string)
Releases the focus trap previously installed via TrapFocusAsync(ElementReference, string).
ValueTask ReleaseFocusAsync(string trapId)
Parameters
trapIdstring
Returns
- ValueTask
TrapFocusAsync(ElementReference, string)
Installs a focus trap inside element, identified by trapId.
ValueTask TrapFocusAsync(ElementReference element, string trapId)
Parameters
elementElementReferencetrapIdstring
Returns
- ValueTask
UnlockScrollAsync()
Releases the document-scroll lock installed by LockScrollAsync().
ValueTask UnlockScrollAsync()
Returns
- ValueTask
WaitForAnimationEndAsync(ElementReference, int)
Resolves once the element's animation ends, or after fallbackMs as a safety net.
ValueTask WaitForAnimationEndAsync(ElementReference element, int fallbackMs)
Parameters
elementElementReferencefallbackMsint
Returns
- ValueTask