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