@neomo/suggest
v0.2.1
Published
Frontend for NEOMO Suggest
Downloads
1
Readme
NEOMO Suggest frontend
Suggest frontend from NEOMO.
Install
$ npm install @neomo/suggest
Usage
import {Suggest} from '@neomo/suggest'
window.suggest = new Suggest(
'[id of search input element]',
'[id of result list container element]',
{
submitFormOnSubmit: false,
host: window.location.host,
url: "/suggest/example",
targetUrl: 'https://www.example.com',
mobile: false,
tolino: false,
authorsCategoryName: 'Autoren',
titlesCategoryName: 'Titel',
param: "query",
minQueryLength: 3,
jsonCallback: 'suggest._results',
extraFields: [ 'price', 'exampleTitles', 'publisher', 'formats', 'authors', 'title', 'group', 'image', 'link' ]
}
);
Development
Create a distributable build of the suggest module:
$ npm run build