ekokotov / object-table

Angular directive to easy create dynamic tables from source or URL with sorting, filtering and pagination. Smart templates and good perfomance
BSD 3-Clause "New" or "Revised" License
171 stars 52 forks source link

Need callback function on column drag event #31

Open Parthvora opened 8 years ago

Parthvora commented 8 years ago

Hello, Is there any way to call an custom function while column order gets changed by dragging and also can we get both orders i.e old column order and new column order in that callback function?

Thanks

ekokotov commented 8 years ago

Did it in dev for now. like: <table ... on-drag="logDrag($oldOrder, $newOrder)" ... > then in your controller: $scope.logDrag = function(oldOrder, newOrder) { console.log(oldOrder, newOrder) }; And you will get in console old and new order of headers. Is it what you need ?

Parthvora commented 8 years ago

Yup, thats exactly what I need.

ekokotov commented 8 years ago

It's in github project now. Will be added in next release. (will be released in few days and you will be able to update using bower)