4

I am looking for a solution to represent unsaved/dirty data in Lightning (console view). So, when accessing Lightning Design System, it's possible to select "Navigation Tab Bar" and select a state called "Unsaved Tab", which is represented by a blue asterisk.

A similar feature is available for VF pages through a method called setTabUnsavedChanges(), but I couldn't find anything similar in lightning:workspaceAPI.

Visualforce Pages: setTabUnsavedChanges()

Sets the unsaved changes icon (Unsaved changes on tab icon ) on subtabs to indicate unsaved data. This method is only available in API version 23.0 or later.

So given the context, my question is...

Is there any way to set an Unsaved tab in Lightning? What's the best way to represent unsaved data on your app?

1
  • 1
    Standard Tabs in lightning console already have a blue asterisk included when there is unsaved data in the record: detail page. If you are using custom components, maybe we can use aura:locationChange (Not sure if this would work - just a guess ) , use the getEnclosingTabId() and setLabel or setIcon() to mark the tab as unsaved. like the floppy icon to indicate this tab has unsaved data , This should be possible.
    – Sumuga
    May 15, 2018 at 14:41

1 Answer 1

1

You are probably looking for the lightning:unsavedChanges component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.