angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

feature request: support for swipe gestures or custom directives to a row div

Open kuzman opened this issue 9 years ago • 2 comments

Hey, I know that your project is targeting pure angularjs. I have a material angular project and I am using your data-table. Material angular has a directive for swipe gestures, but I don't have a way to insert this directive in a row div. is it possible to add the support to add custom directives to a row or maybe swipe gestures?

Thanks!

kuzman avatar Dec 06 '15 18:12 kuzman

Swipe events would be nice. Do you have a proposal that would not couple to angular material?

amcdnl avatar Dec 07 '15 15:12 amcdnl

I don't think so that you can have an implementation out of the box without adding a dependency. Well you can develop your own directive, but you will have to maintained it as well. ngTouch would be a candidate for angularjs apps. you can have an option for the grid options like "swipeLeft: yourFunction" and the expression will be added to the ngTouch directive on a row level: https://docs.angularjs.org/api/ngTouch/directive But, angular material has its own implementations of swipe (touch events), and they show warning that ngTouch should not be used, and then the solution above would not be a good one.

I don't know if it is feasible to have a placeholder for a swipe directive (left, right, up, down) and the user could add a directive with the handler as part of the options. Then the datatable code will be decoupled from the implementation of the gestures. But the user should be aware that he has to add dependencies (ngTouch for angularjs apps, in angular material it is part of the framework) that will detect and raise the event.

I guess those are the option. what do you think?

kuzman avatar Dec 07 '15 16:12 kuzman