mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
98891: Make it possible to provide query to SearchComponent
This commit is contained in:
@@ -134,6 +134,11 @@ export class SearchComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
@Input() viewModeList: ViewMode[];
|
@Input() viewModeList: ViewMode[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The search query
|
||||||
|
*/
|
||||||
|
@Input() query: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current configuration used during the search
|
* The current configuration used during the search
|
||||||
*/
|
*/
|
||||||
@@ -275,6 +280,9 @@ export class SearchComponent implements OnInit {
|
|||||||
configuration: searchOptions.configuration || configuration,
|
configuration: searchOptions.configuration || configuration,
|
||||||
sort: sortOption || searchOptions.sort
|
sort: sortOption || searchOptions.sort
|
||||||
});
|
});
|
||||||
|
if (combinedOptions.query === '') {
|
||||||
|
combinedOptions.query = this.query;
|
||||||
|
}
|
||||||
const newSearchOptions = new PaginatedSearchOptions(combinedOptions);
|
const newSearchOptions = new PaginatedSearchOptions(combinedOptions);
|
||||||
// check if search options are changed
|
// check if search options are changed
|
||||||
// if so retrieve new related results otherwise skip it
|
// if so retrieve new related results otherwise skip it
|
||||||
|
Reference in New Issue
Block a user