Skip to content

Commit

Permalink
[ACS-8743] [ADW] click on search button open a blank page (#4125)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland authored Sep 17, 2024
1 parent 38e94d3 commit a7c3c3e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { ContentActionRef } from '@alfresco/adf-extensions';
import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store';
import { CommonModule } from '@angular/common';
import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { Component, inject, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { MatSelectModule } from '@angular/material/select';
import { Store } from '@ngrx/store';
import { TranslateModule } from '@ngx-translate/core';
Expand All @@ -50,11 +50,12 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
tooltip: string;
bulkSelectControl = new FormControl();

private readonly totalItems$: Observable<number> = this.store.select(getSearchItemsTotalCount);
private readonly onDestroy$ = new Subject();

constructor(private store: Store<AppStore>, private translationService: TranslationService, private extensions: AppExtensionService) {}
private readonly store = inject<Store<AppStore>>(Store);
private readonly translationService = inject(TranslationService);
private readonly extensions = inject(AppExtensionService);

private readonly onDestroy$ = new Subject();
private readonly totalItems$: Observable<number> = this.store.select(getSearchItemsTotalCount);
ngOnInit() {
this.totalItems$
.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ export class SearchInputComponent implements OnInit, OnDestroy {
@ViewChild(MatMenuTrigger, { static: true })
trigger: MatMenuTrigger;

constructor(
private queryBuilder: SearchQueryBuilderService,
private queryLibrariesBuilder: SearchLibrariesQueryBuilderService,
private config: AppConfigService,
private router: Router,
private store: Store<AppStore>,
private appHookService: AppHookService,
private appService: AppService,
public searchInputService: SearchNavigationService
) {
private queryBuilder = inject(SearchQueryBuilderService);
private queryLibrariesBuilder = inject(SearchLibrariesQueryBuilderService);
private config = inject(AppConfigService);
private router = inject(Router);
private store = inject(Store<AppStore>);
private appHookService = inject(AppHookService);
private appService = inject(AppService);
public searchInputService = inject(SearchNavigationService);

constructor() {
this.searchOnChange = this.config.get<boolean>('search.aca:triggeredOnChange', true);
}

Expand Down Expand Up @@ -240,7 +240,7 @@ export class SearchInputComponent implements OnInit, OnDestroy {
}

get onLibrariesSearchResults() {
return this.router.url.indexOf('/search-libraries') === 0;
return this.router?.url.indexOf('/search-libraries') === 0;
}

get onSearchResults() {
Expand Down

0 comments on commit a7c3c3e

Please sign in to comment.