Skip to content

Commit

Permalink
fix: Import Dataset in addon folder (#263)
Browse files Browse the repository at this point in the history
Importing Dataset in app folder causes issues with ember-auto-import
  • Loading branch information
Alonski authored Jun 14, 2019
1 parent 5018c5b commit 5df28f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion addon/components/impagination-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import EmberObject, {
computed
} from '@ember/object';
import layout from '../templates/components/impagination-dataset';
import Dataset from 'impagination';


// TODO: Since `records` are wrapped in Ember.A() not all these methods are accurate
Expand Down Expand Up @@ -37,11 +38,11 @@ export default Component.extend({
'on-init'() {},
'on-observe'() {},

// Impagination Dataset Class: `app/components/impagination-dataset`
Dataset: null,

init() {
this._super(...arguments);
this.set("Dataset", Dataset);

let readOffsetAttrFound = get(this, 'read-offset') >= 0;
warn('Ember Impagination: `read-offset` attribute has been removed. Please use the `on-init` function instead.', !readOffsetAttrFound, {id: 'ember-impagination.attributes.read-offset'});
Expand Down
5 changes: 1 addition & 4 deletions app/components/impagination-dataset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
import Dataset from 'impagination';
import EmberImpagination from 'ember-impagination/components/impagination-dataset';

export default EmberImpagination.extend({ Dataset });
export { default } from 'ember-impagination/components/impagination-dataset';
1 change: 0 additions & 1 deletion app/templates/components/impagination-dataset.js

This file was deleted.

0 comments on commit 5df28f1

Please sign in to comment.