diff --git a/src/app/components/browse/browse.component.ts b/src/app/components/browse/browse.component.ts index ca389e5..cf0c321 100644 --- a/src/app/components/browse/browse.component.ts +++ b/src/app/components/browse/browse.component.ts @@ -19,7 +19,6 @@ export class BrowseComponent implements AfterViewInit { ngAfterViewInit() { const $tableColumn = $('#table-column') - // TODO: on new search, scroll to the top $tableColumn.on('scroll', () => { const pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight const max = $tableColumn[0].scrollHeight @@ -27,5 +26,9 @@ export class BrowseComponent implements AfterViewInit { this.searchService.updateScroll() } }) + + this.searchService.onNewSearch(() => { + $tableColumn.scrollTop(0) + }) } } \ No newline at end of file