0.0.1 • Published 4 years ago

company-autosuggest v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Company Autosuggest

A javascript widget for company field on forms to produce a dropdown with suggested companies. AutoComplete code based on Preact Habitat.

Usage

<div data-widget-container="autocomplete-container">
  <script type="text/props">
    {
      "inputClass": "input field-input mb-30 input--search-icon w-input",
      "dropdownClass": "custom-dropdown"
    }
  </script>
</div>
<script
  src="https://duedil-ltd.github.io/company-autosuggest/<filehash>.js"
  defer="defer"
></script>

A div element is required with data attribute data-widget-container='autocomplete-container', the widget script will render within the container. Properties of widget can be handled from from host. company-autocomplete widget accepts inputClass and dropdownClass that appends custom class name to the element.

Every time script is being published, unique has is generated. This is to avoid issue caused by browser cache. Example: company-autosuggest.296097f97f50b1942802.js

0.0.1

4 years ago