I have created a drop down filter control to a custom list view which filters a table of pages depending on the drop down. When I click on a row to open the page details I get the following pop up:
"You have unsaved changes"
The only two things that have changed on the page is the option in the Drop Down and the table, neither of which I wish to Save.
I have put code into the controller such as
$scope.categoryNames.$dirty = false;
But this has no effect. I may have put this in the wrong place. Do you know where this should be and would this prevent the pop up from appearing?
I'm pretty sure you are on the right track with this. This dialog only shows up when the model is dirty and setting it to false should stop that dialog popping up.
It is my understanding that, when you change the value of something in your model, even though you don't click save, your model will be dirty this happends as soon as the value is modified.
Maybe try printing the value of $dirty to the console a few times to try and work out at which point you need to set it to false.
You have unsaved changes
Hi,
I have created a drop down filter control to a custom list view which filters a table of pages depending on the drop down. When I click on a row to open the page details I get the following pop up:
"You have unsaved changes"
The only two things that have changed on the page is the option in the Drop Down and the table, neither of which I wish to Save.
I have put code into the controller such as
But this has no effect. I may have put this in the wrong place. Do you know where this should be and would this prevent the pop up from appearing?
Thanks
Jon
Hi Jonathan,
I'm pretty sure you are on the right track with this. This dialog only shows up when the model is dirty and setting it to false should stop that dialog popping up.
It is my understanding that, when you change the value of something in your model, even though you don't click save, your model will be dirty this happends as soon as the value is modified.
Maybe try printing the value of $dirty to the console a few times to try and work out at which point you need to set it to false.
is working on a reply...