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

Uncaught TypeError #23

Closed HashirHussain closed 8 years ago

HashirHussain commented 8 years ago

Getting error on drag and drop columns.

Uncaught TypeError: Cannot read property 'setData' of undefined Uncaught TypeError: Cannot read property 'getData' of undefined

ekokotov commented 8 years ago

could you please provide me your markup and browser version?

Mihajlo-Grubjesic commented 8 years ago

+1 When remove jQuery from project it's work, but i need jQuery in project. i install table with bower install --save angular-object-table Thank you...

Parthvora commented 8 years ago

yup, @Comi89 is right, when using this plugin with jQuery it gives: Uncaught TypeError: Cannot read property 'setData' of undefined Uncaught TypeError: Cannot read property 'getData' of undefined

anyway to solve it even if jQuery is there?

Mihajlo-Grubjesic commented 8 years ago

i solve this problem on this way: i set e.dataTransfer.setData.... to e.originalEvent.dataTransfer.setData in object-table.js - key is in originalEvent method... Also do that for getData...

Also do that in angular directive in bower components for columns reorder.

it works for me without problems, i hope that i help... Cheers :)

Parthvora commented 8 years ago

Thanks a lot @Comi89, it worked like a charm. :+1:

ekokotov commented 8 years ago

Thanks guys. Will add this fix to release soon

ekokotov commented 8 years ago

Can't reproduce your issue. What version of Jquery are you used?

Parthvora commented 8 years ago

@ekokotov its v2.1.4

ekokotov commented 8 years ago

update to new version

Parthvora commented 8 years ago

Hey @ekokotov

sorry mate but its still not working with even latest version of jQuery Here is plunker for that:

https://plnkr.co/edit/sTeX2Kj69S7vp5cZqrEX?p=preview

Keep your console open and try to move the columns by dragging then and you will get those errors.

ekokotov commented 8 years ago

Just update object-table to 0.2.2 (is available). See result: https://plnkr.co/edit/Ss7auwzwjiKyu7DHkOjz?p=preview