-
Notifications
You must be signed in to change notification settings - Fork 490
angular-datatables Buttons disappearing on data change #502
Comments
I have the same issue. |
Same issue. |
Same thing here. Anybody figured it out yet? |
Mmh the issues come from the fact that the angular renderer calls |
@philxtian same too. |
+1 |
I have the same too. But I have found out a temporary solution to "keep" the buttons on screen. Like described in DataTables Buttons doc https://datatables.net/extensions/buttons/ under topic "Direct Insertion" we can insert the buttons directly, so we only need to put that code inside "drawCallback" event in datatable options so that the buttons are inserted each time the table is redrawn, like below: |
+1 same issue. |
Hi, I'm having the same issue. +1 |
Could this issue be related? https://github.com/DataTables/DataTables/issues/646 |
I believe it is, but I would appreciate cleaner solution for it :) |
I'm having the same issue as well. Will look into a work around if I can. |
I have tried solution by @arthurjg and it works, the problem is that I needed to downgrade angular-datatables to version 0.4.3, so that I could use |
Looks like the options are getting cleared, I've modified
For some reason the |
My workaround-solution, using the latest version of
Let me know if anyone needs code explained. Note, I'm using the Angular Controller As syntax. Edit: Added |
Thanks @JosephGarrone! Thanks to your comment, I managed to correct the issue. 👍 |
Hello, I am using the following: < script type="text/javascript" src="/plugins/datatables/js/dataTables.buttons.js"></script> which triggers the loading of my DatatablesIntegrationCtrl as well. Defined below: myModule.controller('DatatablesIntegrationCtrl', function($scope, $rootScope, $http, $myUtils, DTOptionsBuilder, DTColumnBuilder) {
..... The first time when I click a button to load a data from ajax, the table gets properly rendered and I see the column visibility button. But the second time I click again the button , or if the data changes , the Colvisibility button disappears. I am using the angular-datatables and * angular-datatables-buttons - v0.5.2 Any idea ? What other info I can provide you to help. Thanks again. |
Just curious as to when 0.5.2 will be released, currently using |
No date set yet. Somewhere in december I think. |
There is still an issue, in that
|
@JosephGarrone , Thank you. Massive thanks to you. Any idea how can I restrict number of columns to be displayed , when the table is first displayed. |
With @JosephGarrone solution with Bootstrap enabled the button still disappear, without Bootstrap while moving through pages the buttons stay, except they keep multiplying by 2 . Using the default code. Any advice? |
Using the @JosephGarrone solution, I do not have the issue you describe @Vaelyr. Perhaps you can show it on a plnkr or something alike? (I merged @JosephGarrone's code to the dev branch) |
@l-lin I have exactly the same code, but using .withBootstrap(); and the buttons won't show. Without Bootstrap I solved the multiplying problem and shows properly the buttons properly now. |
Can you edit this pen to reproduce your issue? |
Okay seems I wasn't using one of the dev branch libraries, works fine with it. Hopefully gets merged to master soon then :) Many thanks! |
Hello,
I'm using angular-datatables v0.5.1, along with the Buttons plugin, using the Angular data model way (datatable="ng"), and when I change the data of the table - 'Copy', 'Print', 'CSV' buttons from the plugin just disappears.
Any changes to the
rows
scope variable, will rid of the Buttons.My dtOptions as follows:
I also tried re-creating the dtOptions after the data change, but no luck there.
This isn't a problem if i use dtColumns, and load data using promises.
Thanks,
Otto
The text was updated successfully, but these errors were encountered: