-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add support for dynamic form fields #32
Comments
Same with the deleting of form fields... try the |
Hello @bbodenmiller! Thank you for your interest in this module. However, you've forgot to mention that you are using a third-party module for list of checkboxes. Angular Input Modified is built around standard ngModel directive and strictly conforms to it's public interface. That makes it compatible with all other input plugins, that also implement the ngModel API. I can't say exactly what the problem is, I don't have much time right now for investigation, but it looks like this issue should be looked into by developers of Thanks! |
Hi @slavafomin thanks for looking into this. I am able to replicate this without a third-party module at http://plnkr.co/edit/l10QsL17GrQROVewd28x?p=preview using the |
Hi. Got same problem. |
Hello! Thank you for an update on this issue. |
Is there any update on this? It would be very helpful if adding/removing an item to a collection flagged it as modified. |
This module is working around However, if you have ideas of how it could be implemented, I'm open for discussions ;) |
We run into the similar issue. Then, we found out that adding/deleting an ngModel after a form has been initialized won't trigger the inputModified.formChanged event. Is it a way we could fire the event? Will it solve the problem and keep the features of this package? |
We have the same issue. Would be nice if you add support for dynamic fields. |
We're having a similar issue. I've put together a plunker to demonstrate the issue in the simplest form possible. 1. Adding new elements to a form does not mark it 2. Removing existing elements does not update the modified flag. -- What that is the use pattern, it is desirable to set the form's |
Thank you everyone for pointing out your issues. However, I see different use cases and different problems mentioned. Could someone reduce everything being said here to a concrete proposition and/or algorithm? The module wasn't designed for dynamic forms initially, so there could be problems with it. Right now we have the following rules: 1). Form's modification state is controlled by modification state of all children forms and models. 2). Model's modification state is determined by it's current value and it's equality to the master value. 3). The master value is determined when control is created or when it's manually marked as So the proposition should take into account above rules. Especially, if you have cases where the rules are not respected for some reason (we should consider such cases as bugs and fix them as a first priority). |
I'm attempting to add new form fields (checkboxes) to a form using
ngRepeat
and have this mark the form as modified. A bit hard to explain but try selecting theAdd new
at http://plnkr.co/edit/TSjSAI2E3FwJHg75Y5Hv?p=preview and see that the form is not marked as modified.Looks related to #12.
The text was updated successfully, but these errors were encountered: