Comments (4)
I've pushed some changes and released a new version: 2.4.0. You can see it in action here: http://betsol.github.io/angular-input-modified/nested-forms/. Please let me know if it works for you. Cheers!
from angular-input-modified.
Hello! Thank you for your interest in this module and sorry for a late reply.
The module itself was not actually designed for dynamic forms. Right now, we have an internal list of modified child forms, so when you remove the child form from the DOM, the directive doesn't know about it and keeps tracking it in it's internal list of changed forms. In order to solve your issue we need to somehow synchronize this list with the actual forms in DOM.
I will think about it. Thank you for a report. Also, if you have any suggestions, I will be glad to discuss them.
from angular-input-modified.
First of all, thank you for maintaining this module. The behaviour described above however should be "optional". A lot of us (i think?) greatly use the fact that when you remove subforms/items the modified flag remains true. Updating to this new version was impossible for me as a lot of "dirty state" behaviour is now reset when a form is temporarily removed from the DOM. And yes, i know it can never be "unmodified" again when it gets added back to the DOM, in our case this is expected behaviour. Leaving the sub-page will mark it as dirty indefinatly (untill saved).
So i'm stuck at 2.3.4.
TLDR; Any chance this could be configurable behaviour?
from angular-input-modified.
Hello @DoubleDot, thank you for your interest.
Could you please describe your use case in more detail? I think the fixes introduced are correct ones and the behavior you are describing is actually could be considered a bug, because the modified state of the form should always be derived from all child fields and forms, so when child form is removed from the DOM, we are now re-checking the modification state according to the actual state of the form and all it's children.
If you would describe your use case in more details I will be glad to offer you some suggestions or to look at the problem from another angle.
from angular-input-modified.
Related Issues (20)
- Add support for CommonJS HOT 5
- ngModel directive is not triggered HOT 6
- Compare Types HOT 3
- bs-modfiable seems to not behave as expected HOT 2
- add license to bower.json file HOT 1
- Add support for ngTagsInput HOT 3
- Angular 2 support? HOT 6
- TypeError: Cannot read property '$$notifyModelModifiedStateChanged' of null HOT 2
- It's not working for Text-Angular . HOT 1
- How to eanble this script on a specific form ? HOT 4
- "Ghost modified control" HOT 1
- Issues with input type=email HOT 1
- Bug with angular 1.6.1 HOT 5
- TypeError: Cannot read property '$$notifyModelModifiedStateChanged' of null
- $$onChildModelModifiedStateChanged HOT 3
- How do I know why the form is marked as modified? HOT 4
- Console Error HOT 5
- Modified state gets screwed when a subform is toggled HOT 1
- Modified state based on $viewValue instead of $modelValue ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-input-modified.