forked from iamsonal/DemoLookup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DemoLookupHelper.js
32 lines (30 loc) · 1.08 KB
/
DemoLookupHelper.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
({
/*searchHelper : function(component, event, getInputkeyWord) {
var action = component.get("c.fetchAccount");
action.setParams({
'searchKeyWord': getInputkeyWord
});
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
var storeResponse = response.getReturnValue();
console.log(storeResponse);
component.set("v.listOfOptions", storeResponse);
}
});
$A.enqueueAction(action);
},*/
loadOptions: function (component) {
var actionMethod = component.get("v.actionMethod");
var action = component.get(actionMethod);
action.setCallback(this, function (response) {
var state = response.getState();
if (state === "SUCCESS") {
var options = response.getReturnValue();
console.log(options);
component.set("v.listOfOptions", options);
}
});
$A.enqueueAction(action);
},
})