Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for 2 or more fields #163

Open
DiogoAngelim opened this issue Jan 8, 2019 · 0 comments
Open

Look for 2 or more fields #163

DiogoAngelim opened this issue Jan 8, 2019 · 0 comments

Comments

@DiogoAngelim
Copy link

For the custom suggestions template to work in my case, I had to use data-value-key="name" attribute. It works now, however, is there a way to use more than one field as value key? Here is my code

<input class="form-control typeahead" autocomplete="off" spellcheck="off" name="assets"
       data-source="assets" data-template="assets_sugestion" data-value-key="name" type="text" placeholder="Type an asset name or its ticker"/>
<template name="assets_sugestion">
  <div class="assets-sugestion">
    <div class="left">
      {{symbol}}
    </div>
    <div class="right">
      {{name}}
    </div>
  </div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant