Reputation: 303
I have a web application where I have many forms which i have created using bootstrap modal.
In my application I have a search textbox with filter button. When I am adding a text and filter the list as per that I get the result (for filter I am using ng-click=search('F') . The result has a edit and delete buttons for each. Now when I open the result data for editing(using edit button) then close it with top right "X" button the ng-click = reset() is called and the filtered values go off.
I want the the filtered values to remain even after i open the files for edit and close it. As the code is confidential I can just put up the code for "X" button
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-ng-click="Reset()">×</button>
the code for search filter button is:
<button class="btn btn-primary" type="button" id="btnFilter" ng-click="Search('F')">
Filter
</button>
Hope I am clear. Please let me know if any other clarification required. I need help with this issue. Thanks in advance.
Upvotes: 0
Views: 116
Reputation: 837
If you are using custom search / filter logic and are re-creating the list after filter, then you will have to re-run your search / filter logic after you are done with your edit / delete functionality.
Had it been a simple ng-repeat filter, angular would have done it for you using 2-way binding and ng-repeat watchers.
But, in your case, call your search method at end of your edit and delete method
Upvotes: 2