Skip to content

2.0.0 ✨

Compare
Choose a tag to compare
@darrenjennings darrenjennings released this 23 May 06:34
· 41 commits to master since this release
fc977b4

Fixes #52, Fixes #96, Fixes #92, Fixes #109, Fixes #99, Fixes #95,

  • Long await v-model support. Use v-model and remove internal searchInput watcher

  • switch to @input event handler for v-model support / more intuitive native <input /> method

  • addresses outstanding TODOs for 2.0 breaking changes such as removing deprecated events onInputChange, onClick, onBlur, onFocus, and onSelected

  • remove initialValue prop as now it can be set via v-model

  • perf(*) remove watcher, use computed for sections, section lists, size etc.

  • you can now configure the type attribute on the <input> via inputProps.type

  • Improved naming/classnames to follow BEM style:

    • autosuggest__input-open --> autosuggest__input--open
    • autosuggest__results_item --> autosuggest__results-item
    • autosuggest__results_item-1 --> autosuggest__results-item--1
    • autosuggest__results_item-highlighted --> autosuggest__results_item-highlighted
    • autosuggest__results_title_${this.section.name} --> autosuggest__results-before--${this.section.name}
  • New slots:

<!-- WARNING PSEUDO CODE, NOT RUNNING CODE OR REAL CLASS NAMES -->
<vue-autosuggest>
  <slot name="before-input"/>
  <input />
  <slot name="after-input"/>
  <div class="container">
    <div class="results">
      <slot name="before-suggestions" />
      <ul class="suggestions">
        <slot name="before-section-<section.name>" />
        
        <li><slot name="default" /></li>
        <slot name="after-section-{section.name}" />
        <slot name="after-section-default" />
      </ul>
    </div>
    <slot name="after-suggestions" />
  </div>
</vue-autosuggest>