Skip to content

Commit

Permalink
Merge pull request #10 from weddingshoppe/feature/remove-option-amount
Browse files Browse the repository at this point in the history
remove optionAmount parameter, replaced with pageSize
  • Loading branch information
nickschot authored Nov 16, 2018
2 parents 3ca69a2 + 6e9ec0a commit cfe5860
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions addon/components/model-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ export default Component.extend({
*/
loadDefaultOptions: fallbackIfUndefined(true),

/**
* The amount of items that is requested from the API. This is disregarded when `infiniteScroll` is enabled.
*
* @argument optionAmount
* @type Number
* @default 10
*/
optionAmount: fallbackIfUndefined(10),

/**
* Whether or not to use infinite scroll.
*
Expand Down Expand Up @@ -261,7 +252,7 @@ export default Component.extend({
this.set('_options', this.get('model'));
} else {
set(query, this.get('pageParam'), 1);
set(query, this.get('perPageParam'), this.get('optionAmount'));
set(query, this.get('perPageParam'), this.get('pageSize'));

this.set('_options', this.get('store').query(this.get('modelName'), query));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/components/model-select-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ module('Integration | Component | model-select', function(hooks) {
await timeout(1);
await settled();

assert.dom('.ember-power-select-option').exists({ count: 10 });
assert.dom('.ember-power-select-option').exists({ count: 25 });
});
});

0 comments on commit cfe5860

Please sign in to comment.