|
1 |
| -/* eslint-disable ember/no-computed-properties-in-native-classes, ember/classic-decorator-no-classic-methods */ |
| 1 | +/* eslint-disable ember/no-computed-properties-in-native-classes */ |
2 | 2 | import { classNames } from '@ember-decorators/component';
|
3 | 3 | import { computed } from '@ember/object';
|
4 | 4 | import Component from '@ember/component';
|
@@ -26,19 +26,17 @@ export default class ApiIndexFilter extends Component {
|
26 | 26 |
|
27 | 27 | filterItems(itemType) {
|
28 | 28 | let items =
|
29 |
| - this.get(`model.${itemType}`) === undefined |
30 |
| - ? [] |
31 |
| - : this.get(`model.${itemType}`); |
32 |
| - if (!this.get('filterData.showInherited')) { |
| 29 | + this.model[itemType] === undefined ? [] : this.model[`${itemType}`]; |
| 30 | + if (!this.filterData.showInherited) { |
33 | 31 | items = items.filter((item) => item.inherited !== true);
|
34 | 32 | }
|
35 |
| - if (!this.get('filterData.showProtected')) { |
| 33 | + if (!this.filterData.showProtected) { |
36 | 34 | items = items.filter((item) => item.access !== 'protected');
|
37 | 35 | }
|
38 |
| - if (!this.get('filterData.showPrivate')) { |
| 36 | + if (!this.filterData.showPrivate) { |
39 | 37 | items = items.filter((item) => item.access !== 'private');
|
40 | 38 | }
|
41 |
| - if (!this.get('filterData.showDeprecated')) { |
| 39 | + if (!this.filterData.showDeprecated) { |
42 | 40 | items = items.filter((item) => item.deprecated !== true);
|
43 | 41 | }
|
44 | 42 |
|
@@ -91,8 +89,8 @@ export default class ApiIndexFilter extends Component {
|
91 | 89 | * @method findMostLocal
|
92 | 90 | */
|
93 | 91 | findMostLocal(currentItem, nextItem) {
|
94 |
| - let currentScope = this.get('model.file'); |
95 |
| - let parentClassScope = this.get('model.parentClass.file'); |
| 92 | + let currentScope = this.model.file; |
| 93 | + let parentClassScope = this.model.get('parentClass').get('file'); |
96 | 94 | if (currentScope === currentItem.file) {
|
97 | 95 | // if the item belongs to the class, keep it
|
98 | 96 | return currentItem;
|
|
0 commit comments