-
Notifications
You must be signed in to change notification settings - Fork 490
Pagination controls disappear after reloadData #549
Comments
It appears the pagination controls are being removed when the hideloading($elem) function is being called in angular-datatables.renderer.js line 34. function hideLoading($elem) {
$elem.show();
$elem.next().remove();
} I tried commenting out $elem.next().remove(); and this keeps the pagination controls in place but then the "loading..." message stays indefinitely. |
Any chance you can chuck up a Plunkr to make it easier to debug? |
Only way I know how to fix this is to find and remove the loading element explicitly: function hideLoading($elem) {
$elem.show();
$('h3.dt-loading').remove();
//$elem.next().remove();
} The loading template was found in angular-datatables.options.js function dtDefaultOptions() {
var options = {
loadingTemplate: '<h3 class="dt-loading">Loading...</h3>',
bootstrapOptions: {},
setLoadingTemplate: setLoadingTemplate,
setLanguageSource: setLanguageSource,
setLanguage: setLanguage,
setDisplayLength: setDisplayLength,
setBootstrapOptions: setBootstrapOptions
}; |
It appear at the example site too
after reload twice the pagination is gone. +1. I'm experiencing the issue too. Right now I'm using re-render instead of reload. Well it's not a good one but better than nothing. |
+1. I'm experiencing the issue too. |
1 similar comment
+1. I'm experiencing the issue too. |
I should read this first before open #557. I will close that one now. +1 to get this fixed. |
I have created a plunker showing this issue. |
@ssuhat, rerender is not working either. See #563 for more info. Do you have any other advice? |
CC @cbarest |
@l-lin, I think this one is important enough to be under milestone 0.5.3. |
+1. I'm experiencing the issue too. |
As @typescripter has said, the issue comes from the code One solution was to wrap the loading message with a |
After calling reloadData() on the dtInstance, the table updates with the new data but the paging controls get removed.
And then after call to realodData():
The data is realoaded in the function 'onBroadcastNewsletterInsertedEvent'. The controls stay in place when I call rerender() instead, but I don't want to rerender() the table since it flickers and this table will be reloaded many times - hence too much flickering when calling rerender().
Here is HTML:
The text was updated successfully, but these errors were encountered: