Native events using transparent wrappers, bugfixes
Transparent wrappers are great! https://twitter.com/darrenjennings/status/976923897915367424
@chrisvfritz explains here: https://www.youtube.com/watch?v=7lpemgMhi0k&t=1315s
Now you can use vue-autosuggest to hook into native events of the input like so:
<vue-autosuggest
:suggestions="mySuggestions"
...
@keydown.tab="closeSuggestions"
@click="clickHandler"
@focus="focusMe"
@blur="focusMe"
/>
methods: {
closeSuggestions(e){
console.log('tab has been pressed!', e);
this.mySuggestions = [];
},
PR:
#34
deprecations:
With the usage of native events, you can now bind to @click
instead of inputProps.onClick
, onBlur
, onFocus
. Please use @focus
, @blur
, @click
moving forward. The inputProps events still work and are backwards compatible, but will display warning messages now. Note to self to fully deprecate these events in 2.0
release.
Very exciting that with new features, comes new and easier ways to redo existing functionality and make the component api even easier!