mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-28 02:17:53 +00:00
PR feedback comments
This commit is contained in:
parent
24cb936b5e
commit
94de04deab
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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}}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user