Skip to content

search in nested array field #145

@ApayRus

Description

@ApayRus

Thanks for great plugin!
I'm trying to use it in dictionary, to point at the root of word. But list of 5 limited selections looks empty. But in console event return some relevant word object, searched through template subscription (not all collection)... Why list of autocomplete items looks empty?
Article collection document looks like { words: [{note, word}], translations: [ ] }
Honestrly, I don't know, what should I write in Template.rootAutocomplete .

  rootAutocompleteSettings() {
    return {
      position: "top",
      limit: 5,
      rules: [
        {
          collection: Articles,
          field: "words.word",
          template: Template.rootAutocomplete
        }
      ]
    };
  }
{{> inputAutocomplete settings=rootAutocompleteSettings id="msg" class="input-xlarge" placeholder="root"}}
<template name="rootAutocomplete">
    {{words.word}}
</template>

peek 2017-12-14 14-58

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