Newer Version Available
lightning:actionOverride
This interface is a marker interface. A marker interface is a signal to the component’s container to add the interface’s behavior to the component. You don’t need to implement any specific methods or attributes in your component, you simply add the interface name to the component’s implements attribute.
The lightning:actionOverride doesn’t add or require any attributes on components that implement it. Components that implement this interface don’t automatically override any action. You need to manually override relevant actions in Setup.
Only components that implement this interface appear in the Lightning component menu of an object action Override Properties panel.
Example
This example shows the markup required to add the lightning:actionOverride interface to a Lightning component.
1<aura:component
2 implements="lightning:actionOverride,force:hasRecordId,force:hasSObjectName">
3
4 <article class="slds-card">
5 <div class="slds-card__header slds-grid">
6 <header class="slds-media slds-media_center slds-has-flexi-truncate">
7 <div class="slds-media__body">
8 <h2><span class="slds-text-heading_small">Expense Details</span></h2>
9 </div>
10 </header>
11 <div class="slds-no-flex">
12 <lightning:button label="Edit" onclick="{!c.handleEdit}"/>
13 </div>
14 </div>
15 <div class="slds-card__body">(expense details go here)</div>
16 </article>
17</aura:component>In Lightning Experience, the standard Tab and View
actions display as a page, while the standard New and Edit actions display in an overlaid
panel. When used as action overrides, Lightning components that implement the lightning:actionOverride interface replace the standard
behavior completely. However, overridden actions always display as a page, not as a panel.
Your component displays without controls, except for the main Lightning Experience
navigation bar. Your component is expected to provide a complete user interface for the
action, including navigation or actions beyond the navigation bar. 