Skip to content

Commit

Permalink
Use an EmberArray instead of a regular one
Browse files Browse the repository at this point in the history
This code was under the assumption that the prototype extensions were enabled, which isn't a certainty in projects, and which is removed in Ember 6. We now default to an EmberArray instead.
  • Loading branch information
Windvis committed Dec 4, 2024
1 parent 143bb38 commit 38c9cb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/components/au-data-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { typeOf } from '@ember/utils';
import { computed, observer } from '@ember/object';
import { bool, equal, oneWay } from '@ember/object/computed';
import Component from '@ember/component';
import { A } from '@ember/array';

// Source: https://github.com/mu-semtech/ember-data-table/blob/c690a3948b2d9d5f91d69f0a935c6b5cdb4862ca/addon/components/data-table.js
const DataTable = Component.extend({
init() {
this._super(...arguments);
if (this.selection === undefined) this.set('selection', []);
if (this.selection === undefined) this.set('selection', A());
},
noDataMessage: 'No data',
isLoading: false,
Expand Down

0 comments on commit 38c9cb2

Please sign in to comment.