jchristman / meteor-tagsinput-autocomplete

A combination of mizzao:autocomplete and a way of creating tags "in" the input box.
http://tagsautocomplete.meteor.com
MIT License
2 stars 1 forks source link

A few fixes getting this to work #2

Open jacobparis opened 8 years ago

jacobparis commented 8 years ago

I have no idea how to properly use git what with the pull requests and whatnot but here are some fixes

tagsinput.js:43

var current_tags = Tags.get(context.data.tagId) || [];

Added the or array bit at the end because it was throwing exceptions if there weren't any tags used yet. This fixes it for me.

tagsinput.js:62

'click .tagclose' : function(event, context) { var instance = this; var current_tags = Tags.get(context.data.tagId); currenttags = .reject(current_tags, function(tag) { return tag._id == instance._id; }); Tags.set(context.data.tagId, current_tags); }

Deleting was not working for me so I rewrote it to use the context instead. This completes your TODO.

I'm still having troubles getting it to search for the text as I type but I'll post here if I have to modify the package to get it to work.

jchristman commented 8 years ago

@JacobPariseau: Sorry I never got back to you on this - I must have forgotten about the email that I got!

I unfortunately do not have time to really get into the weeds of what is happening here, but if you submit a pull request, I will merge and publish an updated library. Just 'fork' the repository (see top right corner of github), make your changes and push them to your fork, and then submit a pull request on my repository using the pull request part of the repo. Github will show me all of the changes and I can merge them into the library, and then publish them to Atmosphere.

Glad to see you got some stuff working that wasn't working for you!