@@ -23,6 +23,7 @@ import {
2323 SafeWidgetGridComponent ,
2424 SafeConfirmService ,
2525 ButtonActionT ,
26+ ContextService ,
2627} from '@oort-front/safe' ;
2728import { TranslateService } from '@ngx-translate/core' ;
2829import { filter , map , startWith , takeUntil } from 'rxjs/operators' ;
@@ -87,6 +88,7 @@ export class DashboardComponent
8788 * @param renderer Angular renderer
8889 * @param elementRef Angular element ref
8990 * @param document Document
91+ * @param contextService Dashboard context service
9092 */
9193 constructor (
9294 private apollo : Apollo ,
@@ -99,7 +101,8 @@ export class DashboardComponent
99101 private confirmService : SafeConfirmService ,
100102 private renderer : Renderer2 ,
101103 private elementRef : ElementRef ,
102- @Inject ( DOCUMENT ) private document : Document
104+ @Inject ( DOCUMENT ) private document : Document ,
105+ private contextService : ContextService
103106 ) {
104107 super ( ) ;
105108 }
@@ -231,7 +234,8 @@ export class DashboardComponent
231234 ? data . dashboard . structure
232235 : [ ] ;
233236 this . buttonActions = this . dashboard . buttons || [ ] ;
234- this . showFilter = this . dashboard . showFilter ;
237+ this . showFilter = this . dashboard . showFilter ?? false ;
238+ this . contextService . isFilterEnabled . next ( this . showFilter ) ;
235239 } else {
236240 this . snackBar . openSnackBar (
237241 this . translate . instant ( 'common.notifications.accessNotProvided' , {
0 commit comments