-
Notifications
You must be signed in to change notification settings - Fork 133
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
Refresh #60
Comments
Hi @FraGoTe, this is not possible at the moment. Only if you provide data with the non-ajax way. That case it'll automatically refresh when your data object changes. |
Is there a workaround for this? What is the best way to refresh the table which has pagination via ajax? |
Update: I figured out that we can use the ng-if to momentarily remove the table off the DOM and re-add it. This causes the table to instantiate itself again and call the paginator callback function, essentially refreshing it externally. Here is a codepen showing this solution: http://codepen.io/anon/pen/yJVXLw |
It is possible for a while which gives you a much better performance and user experience: From the documentation |:white_check_mark:| mdt-trigger-request | function(loadPageCallback) | optional, if |
Can you provide an example of how to use mdt-trigger-request when using Ajax Column Filter Support ? |
How to use that? |
I'm on my first Angular project. I may not be the best to explain, but this works. Add this to your mdt-table directive: mdt-trigger-request="getLoadResultsCallback(loadPageCallback)" Now in your controller, add this: var loadPageCallbackWithDebounce; Now whenever you call loadPageCallbackWithDebounce(), the paginator function gets run again. Here is an example of how to call: $scope.deleteInvoices = function(rows){
}); |
@Spragalas , maybe a bit late but there is an example on http://codepen.io/iamisti/pen/RRrjLk?editors=1010 |
Hi, is there a way to refresh the table via ajax with an external button?
The text was updated successfully, but these errors were encountered: