I am trying to do this, but nothing works ... I am a beginner.
//helper js
getDataFromDB : function(component){
let action = component.get('c.getListContacts');
action.setCallback(this, function(response){
let state = response.getState();
if (state === "SUCCESS") {
let rows = response.getReturnValue();
component.set("v.contacts", rows);
}
});
$A.enqueueAction(action);
this.calculateAmountPage(component);
this.getDisplayDataPagination(component);
},
Methods "calculateAmountPage" and "getDisplayDataPagination" are located below in the same helper.js file.