-
Notifications
You must be signed in to change notification settings - Fork 490
Angular-datatable responsive plugin ng-click incompatibility #305
Comments
Have you tried using the datatables response.details.renderer? |
Hi, Thank you for your answer. I wanted to use it but i don't know how i can get it ! may be with this code ? isn't it to late ? DTInstances.getLast().then(function (dtInstance) { while initialization but how ? $scope.dtOptions ? Thank you for your help |
Mmh I'm not sure you can do it, unfortunately. So it should be possible, but in a really hackish way (using jquery, parsing the HTML, compiling with Angular and such). I do not recommend going this path as it may produce not only a code that will not be readable but also some performance issues. |
Hi, yes, jquery is the ultimate of ultimate solution and i confess that i don't want to use it. I'll try as you said and will make you a feedback if i got something new. Anyway, the temporary solution is to put buttons column among the first columns. Thank you for all |
@mzaarour did you get a solution to your issue? |
Hi, No i went to the solution that not compact the actions column's button , See you Le 28/07/2015 13:22, tahirsaleem a écrit :
|
Ok.. so did you make the action column as the first column of the table?or some other way? Let me know if you have any example or code snippetthat you can share? Date: Tue, 28 Jul 2015 04:57:39 -0700 Hi, No i went to the solution that not compact the actions column's button , the most simple solution :-) If you want to work on it, i will be happy ! See you Le 28/07/2015 13:22, tahirsaleem a écrit :
— |
Yes, i put the action column at max the third column, so that the Le 28/07/2015 14:01, tahirsaleem a écrit :
|
OK.. I will try to replicate that and see how it looks. Date: Tue, 28 Jul 2015 05:05:29 -0700 Yes, i put the action column at max the third column, so that the responsive compact not occurs on it. Le 28/07/2015 14:01, tahirsaleem a écrit :
— |
It is easy to replicate it. I would like to share the code but it's a Le 28/07/2015 14:06, tahirsaleem a écrit :
|
Although I would prefer that the click event was not lost when the control is moved to the child view and am surprised this has been closed, there is a way around it. Similar to @mzaarour suggestion above where the action column is placed at max the third column in the table, we can in fact place our control in any column we want and use a class to tell datatables responsive to never allow that column to become responsive i.e moved to the child row. This can be achieved by using something similar to the following in your table headers
This means that the first 7 columns can be added to the child row, but the 8th, the button, cannot, therefore guaranteeing the button always stays in the parent row, no matter what column it is in Hope this helps |
Hi, First, sorry for my english. I don't know if this issue has already been solved but i found a way to keep the click event with responsive plugin using I'm using renderWith option to customize the rows. In this link from datatables https://datatables.net/reference/option/responsive.details.renderer,
When setting a value to 'responsive' option I used an object.
I don't know if this is the best way to keep the events but it fixed my problem. Hope can help. |
The solution @brianmyler works for me |
Thank you so much @marcokorb ! |
I had faced the same issue. function DeleteEvent(id) { Sample code file is attached. |
Thanks @brianmyler. Its perfect for me. |
@brianmyler Should be the only solution! Works for me too simply add a class="all" to the col heading |
I've created a solution that works for my particular case, I thought I'd share it. All of my datatables are wrapped in a directive that does some extra setup. In its On the plus side, this solution works for tables that have lots of columns with buttons. Additionally, the code may result in multiple compiles of the same content. This was necessary because the user may click something in the compact view, shrink the table (causing the compact view to accumulate more items that aren't yet compiled), then click an uncompiled element. Code (simplified to show the essentials):
Template:
|
I have been struggling with this issue for days before I decided that I'd let that problem for later when the rest of the project is finished. Now It's almost the last thing to fix in my project, and thank god I found this issue on GitHub. @marcokorb your solution seems to be what I'm looking for, however, I get a parser error at @rachellcarbone since you thanked him, did you manage to get his solution working ? How did you do it ? |
Hi,
How can slove the problem ? Thanks For Any Help!! |
Esa la solucion para el problema por si alguien todavia le sirve. |
Hi,
Thank you for your very interesting angular plugin for datatables. I am now facing a problem which is :
My conf :
The issue :
==> I am looking for a function (like a listener) which will allow me to $compile all columns after responsible function.
Have you got another solution ?
Thank you in advance for your help
The text was updated successfully, but these errors were encountered: