@neomo/suggest

0.2.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @neomo/suggest

Weekly Downloads

0

Version

0.2.1

License

ISC

Unpacked Size

71.4 kB

Total Files

3

Last publish

Collaborators

  • flohmeier
  • benarnold
  • mixomat