Developer forum

Forum » Swift » Typeahead 5 elements limitation

Typeahead 5 elements limitation

Mario Santos Dynamicweb Employee
Mario Santos

Hi there,

The displaySuggestions is only displaying if there are more than 5 li elements. Shouldn't it display if there are any? In this website we are not using the content search only products. But, as you can see if we search for kodiak we got 2 products but those are never displayed.

displaySuggestions: function (listElements, searchField) {
   if (listElements.length > 5) {
      var closestDropdown = searchField.closest(".js-type-ahead-dropdown");
      var dropdownMenu = closestDropdown.querySelector(".js-type-ahead-menu");

      dropdownMenu.innerHTML = "";

      listElements.forEach(function (element) {



BR, Mario



You must be logged in to post in the forum