Fulltext search log:
Code used to create the input:
var uri = new goog.Uri('fake');
var typeahead = new plana.ui.ts.TypeaheadSearch(uri);
var loadingImg = goog.dom.createDom('img', { 'src': 'images/ajax-loader.gif' });
typeahead.setLoadingContent(loadingImg);
typeahead.setPlaceholder('Search...');
var container = document.getElementById('autodiv');
typeahead.render(container);
Options:
The table below contains static properties of the typeaheadsearch component. More settings can be configured via the constructor and setter methods. Please see the jsdoc for details.
Option | Description | Default |
plana.ui.ts.TypeaheadSearch.FULLTEXT_SEARCH_PARA
|
The name of the parameter that specifies the server should perform a full search, instead of a search for suggestions. This parameter will be set to 1 if active |
'fulltextsearch'
|
Notes:
This examples contains two objects with a 'caption' property:
{id: 1, caption: 'hello'}, {id: 2, caption: 'world'}
and the following string array:
['coding', 'on', 'keep', 'calm', 'and', 'carry']
that can be searched.
The fulltext search will additionally search:
[{id: 3, caption: 'lorem ipsum'}, {id: 4, caption: 'bah bah black sheep'}]
We simulate a request taking 200ms to complete.