mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Scroll to the top after new search
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user