Skip to main content

foundation-layout.foundationlayout.clearautosaveandreverttodefault

Home > @genesislcap/foundation-layout > FoundationLayout > clearAutosaveAndRevertToDefault

FoundationLayout.clearAutosaveAndRevertToDefault() method

Clears the autosaved layout from local storage and reverts to the default layout

Signature:

clearAutosaveAndRevertToDefault(): boolean;

Returns:

boolean

boolean - true if the autosave was cleared and layout reverted, false if no action was taken

Remarks

This method will remove the autosaved layout associated with the current auto-save-key from local storage and reload the layout using the original configuration that was defined declaratively or set initially. The layout will be reloaded with fresh instances (cache disabled).

If no auto-save-key is set or if the layout is in popup mode, this method returns false without doing anything.