-
Notifications
You must be signed in to change notification settings - Fork 439
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
propagate change event. #413
Comments
A friend helped me with the Angular port, she did it all as I have zero knowledge or interest in Angular.. To make any fixes I would require a reliable PR :) |
see this one: if you disable tagify .. the change event is fired from the textarea once you change it.. will create the PR.. though not sure this is the best solution you would use. |
Your demo page has no Angular. and how do you "enable" it back? what is happening in between? |
yes.. no angular .. tried simplest config to demonstrate it is a general consideration. |
But why do you need a |
the onchange is used to bind the "original" input to the model (plain object) |
Why do you need to bind the "original" input? you only need to populate it with data, but not the other way around, which is to use an "onChange" event listener for it, and work directly with Tagify's events. This sounds similar to this issue: |
Tagify events could work but I think it is a bit more invasive.. In my case, it is quite destructive to do it via Tagify .. The application depends on Angular and schema form (http://schemaform.io/) to bind the form inputs to the model objects automatically upon any changes to the complete form .. if the events are not propagating we will have to rewrite the binding between tagify and the all the forms again.. for us that line in the PR is doing the trick and tagify is working like a charm with angular and schemaform .. :) thought about sharing |
ok sounds good to me, I will look into this |
fixed |
yep.. got the latest version.. works nicely. 👍 |
Prerequisites
Demo Page
https://jsbin.com/degobup/edit?html,js,output
Explanation
using Tagify with Angular .. you would expect that the changes in the original input are propagated to the Angular model.
I think this is more of a general issue, I have it with angular.
the temp fix is to add line below at 1682:
this.DOM.originalInput.dispatchEvent(new Event('change'));
Perhaps you want to validate and see if the change goes with your design or there is a better fix.
What is the expected behavior?
using Tagify with Angular .. you would expect that the changes in the original input are propagated to the Angular model.
What is happening instead?
Angular model is not updated with the changes
What error message are you getting?
The text was updated successfully, but these errors were encountered: