Uncaught TypeError: Cannot read property 'ColumnDefinition' of undefined

Getting error while creating column defination. Followed this - http://opensource.addepar.com/ember-table-addon/#/documentation

tableColumns: Ember.computed(function(){
  let columns = columnArray.map(function(key){
      return Ember.Table.ColumnDefinition.create({
        savedWidth: 150,
        textAlign: 'text-align-center',
        headerCellName: key.w(),
        contentPath: key
  return columns;

My guess is that the API has changed considerably in the 2.0 beta series. The docs seem to be pretty outdated. I’m imagine you’d import ColumnDefinition from the library e.g.:

import ColumnDefinition from 'ember-table-addon/classes/column-definition'

but that’s just a guess you’ll probably want to look at the new code

1 Like