diff --git a/addon/mixins/draggable-column.js b/addon/mixins/draggable-column.js index 43716872..b464a91a 100644 --- a/addon/mixins/draggable-column.js +++ b/addon/mixins/draggable-column.js @@ -125,8 +125,7 @@ export default Mixin.create({ let table = this.get('table'); let columns = this.get('dragColumnGroup'); - let _columns = columns.toArray(); - let targetColumnIdx = _columns.indexOf(targetColumn); + let targetColumnIdx = columns.indexOf(targetColumn); e.dataTransfer.dropEffect = 'move'; e.preventDefault(); @@ -134,9 +133,8 @@ export default Mixin.create({ table.propertyWillChange('columns'); - _columns.removeObject(sourceColumn); - _columns.insertAt(targetColumnIdx, sourceColumn); - columns.setObjects(_columns); + columns.removeObject(sourceColumn); + columns.insertAt(targetColumnIdx, sourceColumn); table.propertyDidChange('columns');