RED-3977 - Scroll button help mode key improvements

This commit is contained in:
Valentin Mihai 2022-05-27 22:12:57 +03:00
parent 82d7f94009
commit 463e329163
3 changed files with 3 additions and 5 deletions

View File

@ -22,6 +22,7 @@ export class ScrollButtonComponent implements OnInit {
@Input() @Required() scrollViewport!: CdkVirtualScrollViewport;
@Input() @Required() itemSize!: number;
@Input() helpModeKey?: string;
showScrollUp$?: Observable<boolean>;
showScrollDown$?: Observable<boolean>;
@ -61,9 +62,4 @@ export class ScrollButtonComponent implements OnInit {
this.scroll(ButtonTypes.top);
}
}
get helpModeKey(): string {
const screen = window.location.href.includes('/dossiers/') ? 'document' : 'dossier';
return `${screen}`;
}
}

View File

@ -35,4 +35,5 @@
*ngIf="hasScrollButton && tableContent?.scrollViewport"
[itemSize]="itemSize"
[scrollViewport]="tableContent.scrollViewport"
[helpModeKey]="helpModeKey"
></iqser-scroll-button>

View File

@ -45,6 +45,7 @@ export class TableComponent<T extends IListable> extends AutoUnsubscribe impleme
@Input() noDataButtonLabel?: string;
@Input() showNoDataButton = false;
@Input() noMatchText?: string;
@Input() helpModeKey?: string;
@Input() tableItemClasses?: Record<string, (e: T) => boolean>;
@Input() itemMouseEnterFn?: (entity: T) => void;
@Input() itemMouseLeaveFn?: (entity: T) => void;