Skip to content

typeahead-callback doesn't show autocomplete prompts #149

@Creling

Description

@Creling

I use "@voerro/vue-tagsinput": "^2.7.1" in my "vue": "^2.6.11" proj to find that typeahead-callback doesn't show autocomplete prompts.

Some code snippets are as follows:

<el-col :span="20" style="margin: auto">
  <tags-input
    element-id="tags"
    v-model="selectedTags"
    :existing-tags="existingTags"
    :typeahead="true"
    :typeahead-callback="search_tags"
    @tag-added="on_tag_added"
    @tag-removed="on_tag_removed"
    :add-tags-on-comma="true"
    :delete-on-backspace="true"
    typeahead-style="badges"
    value-fields="value"
  ></tags-input>
</el-col>
search_tags(query) {
  console.log(query);
  return new Promise((resolve) => {
    this.$axios
      .get( ... )
      .then((res) => {
        let result = [];
        for (let key in res.data) {
          result.push({ key: key, value: res.data[key] });
        }
        console.log(result);
        resolve(result);
      });
  });
},

I notice that console.log(result); prints correct results but no autocomplete prompts are shown.

Any help is appreciated :)

Creling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions