mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-2891] decoupled search service love (#3312)
This commit is contained in:
parent
fd12481843
commit
0d8825c97e
@ -3,7 +3,7 @@
|
|||||||
[maxResults]="maxItems"
|
[maxResults]="maxItems"
|
||||||
[skipResults]="skipCount"
|
[skipResults]="skipCount"
|
||||||
(resultLoaded)="onSearchResultLoaded($event)"
|
(resultLoaded)="onSearchResultLoaded($event)"
|
||||||
#search>
|
#searchResult>
|
||||||
</adf-search>
|
</adf-search>
|
||||||
|
|
||||||
<div class="adf-search-results__facets">
|
<div class="adf-search-results__facets">
|
||||||
|
@ -19,17 +19,18 @@ import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
|||||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||||
import { NodePaging, Pagination } from 'alfresco-js-api';
|
import { NodePaging, Pagination } from 'alfresco-js-api';
|
||||||
import { SearchComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
import { SearchComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
import { UserPreferencesService, SearchService } from '@alfresco/adf-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-search-result-component',
|
selector: 'app-search-result-component',
|
||||||
templateUrl: './search-result.component.html',
|
templateUrl: './search-result.component.html',
|
||||||
styleUrls: ['./search-result.component.scss']
|
styleUrls: ['./search-result.component.scss'],
|
||||||
|
providers: [SearchService]
|
||||||
})
|
})
|
||||||
export class SearchResultComponent implements OnInit {
|
export class SearchResultComponent implements OnInit {
|
||||||
|
|
||||||
@ViewChild('search')
|
@ViewChild('searchResult')
|
||||||
search: SearchComponent;
|
searchResult: SearchComponent;
|
||||||
|
|
||||||
queryParamName = 'q';
|
queryParamName = 'q';
|
||||||
searchedWord = '';
|
searchedWord = '';
|
||||||
@ -76,6 +77,6 @@ export class SearchResultComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDeleteElementSuccess(element: any) {
|
onDeleteElementSuccess(element: any) {
|
||||||
this.search.reload();
|
this.searchResult.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user