diff --git a/src/components/Item.js b/src/components/Item.js index ffc5162..5134fcf 100644 --- a/src/components/Item.js +++ b/src/components/Item.js @@ -17,5 +17,6 @@ export default (item, index, config) => { // If custom content set pass params if (config.resultItem.content) config.resultItem.content(item, result); + // Return the result item element return result; }; diff --git a/src/components/List.js b/src/components/List.js index 3953561..83c8c73 100644 --- a/src/components/List.js +++ b/src/components/List.js @@ -19,5 +19,6 @@ export default (config) => { // Append the DIV element as a child of autoComplete container destination.insertAdjacentElement(config.resultsList.position, list); + // Return the results list element container return list; }; diff --git a/src/controllers/dataController.js b/src/controllers/dataController.js index da0b25f..63cf8d0 100644 --- a/src/controllers/dataController.js +++ b/src/controllers/dataController.js @@ -58,6 +58,6 @@ export default (config, query) => { } }); - // Returns rendered list + // Return matching results list return results; }; diff --git a/src/services/search.js b/src/services/search.js index 8c4c52d..4e4a58a 100644 --- a/src/services/search.js +++ b/src/services/search.js @@ -58,7 +58,7 @@ export default (query, record, config) => { const match = config.resultItem.highlight.render ? record.replace(query, item(config.resultItem.highlight.className, query)) : record; - // Returns the match + // Return the match return match; } }