Created
February 9, 2019 17:50
-
-
Save arun12209/eb2ef229d3b6841d5757e39e1b6ff5d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit :function(component,event,helper){ | |
// Apex method definition | |
var action = component.get("c.loadData"); | |
// callbak function | |
action.setCallback(this,function(response){ | |
//get state | |
var state = response.getState(); | |
// check if state is 'SUCCESS' | |
if(state == 'SUCCESS'){ | |
var result = response.getReturnValue(); | |
//set value to "UnfilteredData" attaribute | |
component.set("v.UnfilteredData",result); | |
console.log(result); | |
// set value to "data" attaribute | |
component.set("v.data",result); | |
}else{ | |
console.log('something bad happend! '); | |
} | |
}); | |
// put the action into queue for server call. | |
$A.enqueueAction(action); | |
}, | |
doFilter: function(component, event, helper) { | |
//calling helper | |
helper.FilterRecords(component); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment