@den4ik92/ng2-smart-table 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -316,11 +316,9 @@ class DataSet {
316
316
  * @private
317
317
  */
318
318
  createColumns(settings) {
319
- for (const id in settings) {
320
- if (settings.hasOwnProperty(id)) {
321
- this.columns.push(new Column(id, settings[id], this));
322
- }
323
- }
319
+ settings.forEach((columnSettings) => {
320
+ this.columns.push(new Column(columnSettings.key, columnSettings, this));
321
+ });
324
322
  }
325
323
  /**
326
324
  * Create rows based on current data prepared in data source
@@ -3018,7 +3016,7 @@ class Ng2SmartTableComponent {
3018
3016
  class: '',
3019
3017
  },
3020
3018
  noDataMessage: 'No data found',
3021
- columns: {},
3019
+ columns: [],
3022
3020
  pager: false,
3023
3021
  rowClassFunction: () => '',
3024
3022
  };