PR feedback comments

This commit is contained in:
Ignacio Bona 2018-09-17 10:54:11 -07:00
parent 24cb936b5e
commit 94de04deab
3 changed files with 6 additions and 6 deletions

View File

@ -32,8 +32,8 @@ interface ISearchFacet {
* It will store state related to search facets.
*/
export default class SearchFacetsContainer extends Component {
didInsertElement(this: SearchFacetsContainer) {
get(this, 'getPlatformsTask').perform();
didInsertElement() {
this.getPlatformsTask.perform();
}
/**

View File

@ -16,10 +16,10 @@ export default class SearchFacet extends Component {
* facet. If that is the case, a clear button will show up.
*/
@computed('selections')
get showClear(): boolean {
get showClearBtn(): boolean {
const selections = this.selections || {};
return Object.keys(selections).reduce((willShowClear: boolean, selectionKey: string) => {
return willShowClear || selections[selectionKey];
return Object.keys(selections).reduce((willShowClearBtn: boolean, selectionKey: string) => {
return willShowClearBtn || selections[selectionKey];
}, false);
}
}

View File

@ -1,7 +1,7 @@
<div class="nacho-container search-facet">
<section class="search-facet__header">
<h4 class="search-facet__title">{{facet.displayName}}</h4>
{{#if showClear}}
{{#if showClearBtn}}
<button
class="nacho-button--tertiary"
{{action onClear facet}}>