umco/umbraco-nested-content

$dirty is not set when removing items

bjarnef opened this issue · 3 comments

When removing items from Nested Content, it seems it doesn't set $dirty property on the form, which display "unsaved changes" prompt.
Tested with latest v.0.4.0 release.

Furthermore it could also set $dirty, when sorting of items is changed.
I did that in UrlPicker :)

When sorting change:
https://github.com/kgiszewski/uWestFest/blob/master/urlpicker/app/scripts/controllers/url.picker.controller.js#L294

When an item is removed:
https://github.com/kgiszewski/uWestFest/blob/master/urlpicker/app/scripts/controllers/url.picker.controller.js#L258

When an item is added:
https://github.com/kgiszewski/uWestFest/blob/master/urlpicker/app/scripts/controllers/url.picker.controller.js#L222

@bjarnef Thanks for the info. Sounds like it would be a great PR, if you want?

@leekelleher I have submitted a PR for this #114

Great, thanks @bjarnef! I'll close this one off.