mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +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[];
|
||||
|
||||
/**
|
||||
* The search query
|
||||
*/
|
||||
@Input() query: string;
|
||||
|
||||
/**
|
||||
* The current configuration used during the search
|
||||
*/
|
||||
@@ -275,6 +280,9 @@ export class SearchComponent implements OnInit {
|
||||
configuration: searchOptions.configuration || configuration,
|
||||
sort: sortOption || searchOptions.sort
|
||||
});
|
||||
if (combinedOptions.query === '') {
|
||||
combinedOptions.query = this.query;
|
||||
}
|
||||
const newSearchOptions = new PaginatedSearchOptions(combinedOptions);
|
||||
// check if search options are changed
|
||||
// if so retrieve new related results otherwise skip it
|
||||
|
Reference in New Issue
Block a user