mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 18:45:09 +00:00
Scroll to the top after new search
This commit is contained in:
@@ -19,7 +19,6 @@ export class BrowseComponent implements AfterViewInit {
|
|||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
const $tableColumn = $('#table-column')
|
const $tableColumn = $('#table-column')
|
||||||
// TODO: on new search, scroll to the top
|
|
||||||
$tableColumn.on('scroll', () => {
|
$tableColumn.on('scroll', () => {
|
||||||
const pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight
|
const pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight
|
||||||
const max = $tableColumn[0].scrollHeight
|
const max = $tableColumn[0].scrollHeight
|
||||||
@@ -27,5 +26,9 @@ export class BrowseComponent implements AfterViewInit {
|
|||||||
this.searchService.updateScroll()
|
this.searchService.updateScroll()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.searchService.onNewSearch(() => {
|
||||||
|
$tableColumn.scrollTop(0)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user