diff --git a/src/frontend/app/search/result-list/search-result-list.component.html b/src/frontend/app/search/result-list/search-result-list.component.html index 868edb74b5851e6c363a73311ef7a70fe6b2a5b4..03fb4430a037d57fd26541081c11c31fa755ea41 100644 --- a/src/frontend/app/search/result-list/search-result-list.component.html +++ b/src/frontend/app/search/result-list/search-result-list.component.html @@ -6,13 +6,13 @@ *ngIf="!hideFilter"></app-filter-tool-adv-search> </ng-template> <ng-template #toolTemplate> - <div *ngIf="data.length > 0" class="filtersContent"> + <div class="filtersContent"> <div style="flex: 1"></div> <div class="orderTool"> <mat-form-field class="basket-order"> <mat-icon matPrefix class="fa fa-list"></mat-icon> <mat-select [(ngModel)]="this.listProperties.order" (selectionChange)="updateFilters()" - [disabled]="isLoadingResults"> + [disabled]="isLoadingResults ||Â data.length === 0"> <mat-option [value]="column.id" *ngFor="let column of displayColsOrder"> {{'lang.' + column.id | translate}} </mat-option> @@ -20,7 +20,7 @@ </mat-form-field> </div> <div class="ascDescTool"> - <button [disabled]="this.listProperties.order == '' || isLoadingResults" + <button [disabled]="this.listProperties.order == '' || isLoadingResults ||Â data.length === 0" [style.opacity]="this.listProperties.order == '' ? '0.2' : '1'" mat-fab [title]="this.listProperties.orderDir == 'DESC' ? this.translate.instant('lang.descOrder') : this.translate.instant('lang.ascOrder')" style="color: rgba(0,0,0,0.38);" (click)="changeOrderDir();"> @@ -203,7 +203,7 @@ </span> <span class="main-info-data" (click)="launch(row);" style="font-weight:bold;flex:1;cursor:pointer;" [class.undefined]="row.subject == this.translate.instant('lang.undefined')" - title="{{row.subject_title}}" [innerHTML]="row.subject | shorten: 150: '...'"></span> + title="{{row.subject_title}}" [innerHTML]="row.subject"></span> <span *ngIf="sidenavRight !== undefined" class="main-info-action"> <button mat-icon-button [class.highlightResultIcon]="row.inNotes" title="{{'lang.notes' | translate}}" diff --git a/src/frontend/app/search/result-list/search-result-list.component.ts b/src/frontend/app/search/result-list/search-result-list.component.ts index 2e2c8bfb002e1b60f5c6d1542d69ffc2f0b92bb9..edcba334a3ae39e9ebed403905ad3a8235d48318 100644 --- a/src/frontend/app/search/result-list/search-result-list.component.ts +++ b/src/frontend/app/search/result-list/search-result-list.component.ts @@ -284,6 +284,8 @@ export class SearchResultListComponent implements OnInit, OnDestroy { startWith({}), switchMap(() => { if (!this.isLoadingResults) { + // To Reset scroll + this.data = []; if (this.sidenavRight !== undefined) { this.sidenavRight.close(); }