Giter VIP home page Giter VIP logo

autocomplete-vuejs's Introduction

autocomplete-vuejs

Sample VueJs component to demonstrate the Autocomplete using Bootstrap

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For more information see the docs for vueify.

autocomplete-vuejs's People

Contributors

fareez-ahamed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autocomplete-vuejs's Issues

How to Implement a Object Filter instead of Strings

Hello @fareez-ahamed and Thank you for the excellent tutorial,

Im trying to implement your Typeahead component but instead of searching only an array of strings, an array of Objects like.

"subscribers": [
    {
      "id": 2,
      "firstname": "user1",
      "lastname": "user1",
      "email": "[email protected]",
    },
  {
      "id": 3,
      "firstname": "user2",
      "lastname": "user2",
      "email": "[email protected]",
    }
  ]

And when an option is Clicked to set the email as the chosen field.

Ive read this Forum Thread but it seems filters arent available in vue 2.0 so I would need it to make it with Computed properties.

Please Give me an Advice because when
passing the object through Matches:
str isnt a string anymore it will become an array of strings.
so doesnt work anymore.

matches:function() {
        return this.suggestions.filter(function(str) {
            return str.indexOf(this.selection) >= 0;
        });
        },

I think that implementation would be very usefull to everybody ๐Ÿ˜„

Suggestion only either matches first letter or partial word

Thanks for posting this!

I've been tinkering around with it a bit and I noticed if I type the first letter of a word in the suggestions array I get a suggestion (or more if there are more matches); however if I type more than that the suggestions stop appearing. So for instance if I type K I see "Kolkata" but if I type anything from Ko to Kolkata I see no results.

If I type a segment of the word and omit the first letter, it appears to always work. So for example, if I type anything from o to olkata I get a suggestion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.