You need to sign in to do that
Don't have an account?
VINODKUMAR REDDY KALUVA
How to move up and down rows in lightning component
How to move up and down rows in lightning component
//Code From Controller Moveup : function(component, event, helper){ console.log("enetered for moveup"); //Execute the DeleteRowEvent Lightning Event and pass the deleted Row Index to Event attribute component.getEvent("Rowupdown").setParams({"indexVar" : component.get("v.rowIndex") }).fire(); }, Movedown : function(component, event, helper){ console.log("enetered for movedown"); //Execute the DeleteRowEvent Lightning Event and pass the deleted Row Index to Event attribute component.getEvent("Rowdown").setParams({"indexVar" : component.get("v.rowIndex") }).fire(); }
<!--Code of Component --> <td> <a onclick="{!c.Moveup}"> <lightning:icon iconName="utility:chevronup" class="slds-icon slds-icon_small" size="small" alternativeText="chevronup"/> <span class="slds-assistive-text">Up</span> </a> </td> <td> <a onclick="{!c.Movedown}"> <lightning:icon iconName="utility:chevrondown" class="slds-icon slds-icon_small" size="small" alternativeText="chevrondown"/> <span class="slds-assistive-text">Down</span> </a> </td>