diff --git a/src/main/default/aura/Lookup/LookupController.js b/src/main/default/aura/Lookup/LookupController.js index 9ce39e6..aca1f0f 100644 --- a/src/main/default/aura/Lookup/LookupController.js +++ b/src/main/default/aura/Lookup/LookupController.js @@ -8,7 +8,7 @@ selectedIds : helper.getSelectedIds(component) }); - action.setCallback(this, (response) => { + action.setCallback(this, function(response) { const state = response.getState(); if (state === 'SUCCESS') { helper.toggleSearchSpinner(component); @@ -99,7 +99,7 @@ } // Delay hiding combobox so that we can capture selected result const blurTimeout = window.setTimeout( - $A.getCallback(() => { + $A.getCallback(function() { component.set('v.hasFocus', false); component.set('v.blurTimeout', null); }), diff --git a/src/main/default/aura/Lookup/LookupHelper.js b/src/main/default/aura/Lookup/LookupHelper.js index a844e36..fc429ce 100644 --- a/src/main/default/aura/Lookup/LookupHelper.js +++ b/src/main/default/aura/Lookup/LookupHelper.js @@ -24,7 +24,7 @@ clearTimeout(searchTimeout); } searchTimeout = window.setTimeout( - $A.getCallback(() => { + $A.getCallback(function() { // Send search event if it long enougth const searchTerm = component.get('v.searchTerm'); if (searchTerm.length >= 2) { @@ -41,7 +41,7 @@ selectResult : function(component, recordId) { // Save selection const searchResults = component.get('v.searchResults'); - const selectedResult = searchResults.filter(result => result.id === recordId); + const selectedResult = searchResults.filter(function(result) { return result.id === recordId; }); if (selectedResult.length > 0) { const selection = component.get('v.selection'); selection.push(selectedResult[0]); @@ -56,12 +56,12 @@ getSelectedIds : function(component) { const selection = component.get('v.selection'); - return selection.map(element => element.id); + return selection.map(function(element) { return element.id; }); }, removeSelectedItem : function(component, removedItemId) { const selection = component.get('v.selection'); - const updatedSelection = selection.filter(item => item.id !== removedItemId); + const updatedSelection = selection.filter(function(item) { return item.id !== removedItemId; }); component.set('v.selection', updatedSelection); },