Spring 19 introduced new lightning:unsavedChanges component, which works very nicely. However, I would need to manage buttons on modal that is shown when user is trying to navigate to some other page inside SF:
My idea is that this could be done via options
argument of setUnsavedChanges
function. However, the only documented parameter is label
. Is there any way, how I can know, which parameters are available?
setUnsavedChanges
is to indicate that your state is dirty and optionally indicate why. If you wanna fire specific callbacks on save or discard, there areondiscard
andonsave
params?