- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:11 PM
I have created a custom Typeahead search & homepage search Widget.
I did this like 6 months ago and have some flashback that there was a twist to get it to work.
If I type something, the dropdown isn't working like it should. If I press enter I get to the search page and the correct results is showing...Anyone know about this behavior?
This is how it looks like:
and if I press enter I get to the search results and it shows me the 6 items I should have seen in the dropdown. If I change the custom homepage to use the OOB typeahead widget here:
it works like it should...
//Göran
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:40 PM
found it... when I cloned the widget, the angular ng-template "sp-typahead.html" didn't tag along, and it uses that to show the results...
Weird part here is that that template can only be on 1 widget at the time. so when I edited and put it here, it vanished from the first.
so I created a new one for my typeahead with the same data as this template and just changed in the code to go for my template.
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:18 PM
For the typeahead widget you've created did you set-up the CSS? From your screenshot, I think the results are showing but the height is not set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:30 PM
I cloned the OOB one, and did nothing to the code.. but there must be something else.
I get the same effect on all the typeahead search as well..
but.. if I on a page have both the OOB typeahead widget and the custom one.. it works.. and If I first go to the page where the oob version is and then to the homepage search, it starts to works as well..
but if I got to homepage search first, it doesnt...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:37 PM
I did something similar where I cloned Typeahead Search [typeahead-search] and Homepage Search.
However, for the Homepage Search, I removed the server script and below is what I did in the HTML:
<div id="homepage-search" class="hidden-xs wrapper-lg">
<div class="wrapper-lg">
<h1 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="options.title"></h1>
<h4 ng-if="options.short_description" class="text-center m-b-lg sp-tagline-color" ng-bind="options.short_description"></h4>
<widget id="clonedid_typeahead_search"></widget> //add the id value of the clone Typeahead Search
</div>
</div>
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 02:40 PM
found it... when I cloned the widget, the angular ng-template "sp-typahead.html" didn't tag along, and it uses that to show the results...
Weird part here is that that template can only be on 1 widget at the time. so when I edited and put it here, it vanished from the first.
so I created a new one for my typeahead with the same data as this template and just changed in the code to go for my template.
//Göran