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

Using this with Autoform #1

Closed ghost closed 8 years ago

ghost commented 9 years ago

Is there a way to elegantly use this with Autoform and the schema definitions?

abhaytalreja commented 9 years ago

Is there any update to this? @latitudehopper - Did you get a work-around this by any chance?

jchristman commented 9 years ago

I have not developed this robustly enough to know its comparability with autoform. Fact is, I was a big time meteor noob when I write this library and it probably needs a redesign.

That being said, I am open to contributions if you want to rewrite some code. If you find a way to make it work with autoform I will also add that to the documentation.

abhaytalreja commented 9 years ago

wow! that was great passion there! bring it back :)

I am new to meteor but hopefully, i will learn enough.. to make some changes..

jchristman commented 9 years ago

Tell you what - I'm taking a trip this weekend and will have some time to work on this in airports and such. I'll take the time to rework the code and see if I can't conform to the autoform scheme standards.

abhaytalreja commented 9 years ago

awesome!

jchristman commented 8 years ago

I've got it mostly worked out. Just not quite easy to integrate. Still a bug or two to iron out. I'll try to finish it up this weekend.

jchristman commented 8 years ago

Check out a rough example at http://tagsautocomplete.meteor.com/. I've still got a few kinks to work out, as well as update form support, but I've got the hard parts figured out. Let me know if you have any feedback! The code for it is in the example directory.

abhaytalreja commented 8 years ago

Thanks a lot.. looks great... i will try and integrate it with the code and see if i see any issues...

jchristman commented 8 years ago

Note that I have not yet published the new code to the package - it is still only running from the git repo.

Sent from my iPhone

On Oct 6, 2015, at 09:16, Abhay Talreja notifications@github.com wrote:

Thanks a lot.. looks great... i will try and integrate it with the code and see if i see any issues...

— Reply to this email directly or view it on GitHub.

abhaytalreja commented 8 years ago

Hi @jchristman - I finally tried implementing this tag approach.. and with a lost of issues with quickform, cracked it. The only problem i am seeing is that the input for the tags is another collection. When i select the tag... instead of storing the _id of the tag, it is storing the 'name' of the tag. That being said, how can we have both. The reason being i want to make the 'name' as the hyperlink to the 'id' - Just as you see git has mentions.

jchristman commented 8 years ago

Right - as of right now, the first run at implementing autoform support had me just grabbing the value from the HTML, which is not a great way of doing it. My next iteration, which I'm working on now will be inserting an object instead of a string into the autoform. I think you'll find the new code much easier to deal with once I finish it up. Life has just been crazy recently so I haven't had much time to work on it. Sorry!

Sent from my iPhone

On Oct 14, 2015, at 01:55, Abhay Talreja notifications@github.com wrote:

Hi @jchristman - I finally tried implementing this tag approach.. and with a lost of issues with quickform, cracked it. The only problem i am seeing is that the input for the tags is another collection. When i select the tag... instead of storing the _id of the tag, it is storing the 'name' of the tag. That being said, how can we have both. The reason being i want to make the 'name' as the hyperlink to the 'id' - Just as you see git has mentions.

— Reply to this email directly or view it on GitHub.

abhaytalreja commented 8 years ago

Oh i can absolutely understand... Thank you for all the time, you got onto for my request... that's respectable! :) Let me know once you are done... i am trying to work through some other packages/implementations too...

abhaytalreja commented 8 years ago

Just checking, any luck on getting the id's work? - Thanks for all the help!

jchristman commented 8 years ago

Yes I have. See the example for how to insert objects. In this case, I now render invite.username, but invite._id is also there. If you have any questions let me know.

Once I get the other autoform support (like update instead of insert), I will call it complete. I have published another release though.

abhaytalreja commented 8 years ago

Fantastic! i saw the code change.. yes, update would be much appreciated.. i will try to go ahead with the insert...

By update you mean that if i add/remove tags it will update the collection, correct?

Once again, can't thank you enough :)

jchristman commented 8 years ago

Correct - updating an existing document.

Sent from my iPhone

On Oct 18, 2015, at 16:06, Abhay Talreja notifications@github.com wrote:

Fantastic! i saw the code change.. yes, update would be much appreciated.. i will try to go ahead with the insert...

By update you mean that if i add/remove tags it will update the collection, correct?

Once again, can't thank you enough :)

— Reply to this email directly or view it on GitHub.

abhaytalreja commented 8 years ago

I just checked, @1.1.0-PRE.2 isn't released, as in i can directly get from atmosphere? The default loads to @=1.0.1 but that doesn't have your changes, right?

Well, i just took the latest codebase directly into the project...

While selecting package versions:
error: No version of jchristman:tagsinput-autocomplete satisfies all constraints: @1.1.0-PRE.2, @=1.0.1
Constraints on package "jchristman:tagsinput-autocomplete":
* jchristman:tagsinput-autocomplete@1.1.0-PRE.2 <- top level
* jchristman:tagsinput-autocomplete@=1.0.1 <- top level
abhaytalreja commented 8 years ago

I was able to test it, it stored the id and name in the collection. You were right, it is not able to get the pre-selected tags as of now.

Also, i think the templates that you have used is reactive and so is loading even though there is no change in data or screen, not sure why? (in edit move, when i just saw the console, the template got reloaded often nothing from the subscription changed)

Another issue i saw was below (in browser console)

Exception in template helper: Error: AutoForm: No component found for rendering input with type "autocomplete-input"
    at Object.afFieldInputContext (http://localhost:3000/packages/aldeed_autoform.js?019cba9c67d18d17c34ea48a455d8956ded05487:7096:13)
    at http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:2994:16
    at http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:1658:16
    at http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:3046:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:3679:12)
    at http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:3045:27
    at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?3eafdd2d5d5d8f08431aa842df4b5e8142600b17:175:18)
    at http://localhost:3000/packages/aldeed_autoform.js?019cba9c67d18d17c34ea48a455d8956ded05487:7015:23
    at wrappedArgFunc (http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:2908:14)
    at null.<anonymous> (http://localhost:3000/packages/blaze.js?695c7798b7f4eebed3f8ce0cbb17c21748ff8ba8:2621:26)
jchristman commented 8 years ago

I have just published version 1.1.0 and redeployed the example with full insert/update functionality for the tagsinput field. I'm going to close this issue as the original point has been addressed. Let me know if you find any further issues!