Skip to content
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

Cancel in Modal Popup leaves changes in list #13

Closed
biomade opened this issue Apr 29, 2017 · 2 comments
Closed

Cancel in Modal Popup leaves changes in list #13

biomade opened this issue Apr 29, 2017 · 2 comments

Comments

@biomade
Copy link

biomade commented Apr 29, 2017

I was testing a change to an item using the edit (modal) form.
If you change any field, the change is immediately shown in the list, behind the modal form (which will happen because both are bound to the same item model.

BUT if you click the cancel button to close the modal form, the change is still in the list which should not happen because the save button was not clicked.

I made this change in the controller cancel function and now the list re-displays the valid data.
You might want to implement this change or should I try to do it myself (I have never done that to someone else's code!)


  $scope.cancel = function() {
    //$scope.form = {};
    //this will refresh the page without the changes
    $scope.list();
  }
@jayralencar
Copy link
Contributor

Yes, you can do it.

@biomade
Copy link
Author

biomade commented Apr 29, 2017

Thanks, I have cloned the repo to my machine and added a branch. I can't submit it via a pull request. I think you need to add me to the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants