===
JavaScript plugin for DaData.ru Suggestions service.
npm install @dadata/suggestions
import { init, dispose } from '@dadata/suggestions';
// ...
// when you need to initialize Suggestions on some input
const addressInput: HTMLInputElement = document.getElementById(...);
const disposeSuggestions = init(addressInput, { type: 'address' });
// ...
// if you need to remove the Suggestions from the input
// use callback returned from `init()`
disposeSuggestions();
// or just
dispose(addressInput);
- lib/findById.js -- basic search without ui
- lib/findById.ie.js -- same, but built with polyfills
- lib/suggest.js (default) -- search with auto-complete ui
- lib/suggest.ie.js -- same, but built with polyfills