furo-lock-navigation

furo-lock-navigation #

@furo/route v2.6.13
import '@furo/route/src/furo-lock-navigation.js';
exports FuroLockNavigation js
exports <furo-lock-navigation> custom-element-definition
superclass LitElement
mixes FBP

summary Blocks the furo-location-updater from navigating away

furo-lock-navigation Blocks the furo-location-updater and furo-app-flow-router from navigating away if you have unsaved changes or work to do.

This component also adds a listener to the unload event, which kicks in at a reload or close of the window.

1
<furo-lock-navigation fn-lock="--dataChanged" fn-unlock="--saveSuccess"></furo-lock-navigation>

Attributes and Properties #

message #

message string default: 'You have unsaved changes, proceed anyway?'

The warning message, which is displayed at the prompt.

Events #

furo-navigation-locked #

at-furo-navigation-lockedvoid

Fired when the navigation was locked

furo-navigation-unlocked #

at-furo-navigation-unlockedvoid

Fired when the navigation was unlocked

Methods #

lock #

lock() ⟹ void

*fn-lock

Blocks furo-location-updater and furo-app-flow-router from navigating away.



unlock #

unlock() ⟹ void

*fn-unlock

Removes the lock.