darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

"Vue.config.errorHandler" occurs and the list does not appear. #122

Closed parts-web-craft closed 5 years ago

parts-web-craft commented 5 years ago

I am Japanese. Please forgive me though it is dirty English. I wanted to use v-model and changed the version to 2.0.0. However, when I move the cursor to input, Vue.config.errorHandler occurs and the list does not come out. The following is the template and error content.

<vue-autosuggest
   :suggestions="suggestList"
   :input-props="{id:'Candidate', placeholder:'名前を入力'}"
   @selected="onSelected"
>
  <div slot-scope="{suggestion}">
    <span class="my-suggestion-item">{{suggestion.item}}</span>
  </div>
</vue-autosuggest>

suggestList: any[] =[{data:['Frodo', 'Samwise', 'Gandalf', 'Galadriel', 'Faramir', 'Éowyn']}];
result: string = '';

onSelected(item) {
    this.result.= item.item;
 }
Captured in Vue.config.errorHandler: render TypeError: Cannot create property 'before-section-default' on boolean 'true'

I tried to investigate, but it is in a state of trouble. This project adopts typescript, is it related or not? I hope you will lend me your strength.

darrenjennings commented 5 years ago

This is an issue with Typescript. I am not familiar, so could use some help here.

parts-web-craft commented 5 years ago

@darrenjennings Thank you for your reply. I understand that it is a problem of TypeScript. I will review this environment a little more.