Coder Social home page Coder Social logo

paper-tags-input's People

Contributors

cheonhyangzhang avatar macthezazou avatar sarbull avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

paper-tags-input's Issues

error while deleting the tags

Hello I'm getting the below error while deleting the tags using the x button..any help?

tag-item.html:159 Uncaught TypeError: Cannot read property 'parentElement' of null

Here is actual line of code.

var parent = e.target.parentElement.parentElement.parentElement;

Multiple element is sharing the variable if no initial variable assign to tags property.

Per @apalaniuk
it's well worth noting here that your default value initialization of the tags property doesn't seem right. You're setting the value to be an empty array, which will cause a single array to be used across all instances of the component, so you can't use multiple components on the same page with independent tags. The default value for arrays and objects (if set) should be a function that returns a new array instead, which is invoked once per instance - or you can do as you're doing in _addTag and lazily initialize if needed. See https://www.polymer-project.org/1.0/docs/devguide/properties#configure-values

Also, if (typeof(this.tags) == 'undefined' || this.tags == null) is redundant - this.tags == null will catch both null and undefined. But, shouldn't it be this.tags instanceof Array?

Autocomplete feature request

Thank you for the good work.

A suggestion feature would be so great.

<paper-tag-input
    tag-suggestions="idOfIronAjaxElemThatKnowsWhereToLook"
    >
</paper-tags-input>

Uncaught TypeError: Cannot read property 'push' of null

Array not initialized error, recommend changing _addTag function as follows:

_addTag: function(tag){
      if (this.enableAdd == false){
        return;
      }
      if (typeof(this.tags) == 'undefined' || this.tags == null){
        this.tags = [];
      }
      this.tags.push(tag);
      this.tags = this.tags.slice();  
    },

Added this.tags == null to catch the issue

License

Can you put a license on this? MIT would be nice.

bower install vs. bower install --save

The installation instructions have the following command:

bower install paper-tags-input

However, this only adds the needed files and does not add the element to the bower.json. The command should be updated as follows:

bower install --save paper-tags-input

This will add the element to the bower.json so it can be installed with bower install. This will also make it more consistent with other Polymer element documentation (see <paper-button> for example).

TypeError: Cannot set property 'invalid' of null

I receive following error:

Uncaught TypeError: Cannot set property 'invalid' of null, paper-tags-input.html:262

It should not use following syntax:
var input = document.querySelector('#tag-input');
since it use shadow DOM.

If you replace it with:
var input = Polymer.dom(this.root).querySelector('#tag-input');
it will be working.

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.