Fix checkboxes and bulk download

This commit is contained in:
Geomitron
2023-12-25 10:29:57 -06:00
parent 5644ea2447
commit 199374b2e2
12 changed files with 66 additions and 126 deletions

View File

@@ -1,36 +1,21 @@
import { Component, HostBinding, ViewChild } from '@angular/core'
import { AfterViewInit, Component, ElementRef, HostBinding, ViewChild } from '@angular/core'
import { SearchService } from 'src-angular/app/core/services/search.service'
import { ChartSidebarComponent } from './chart-sidebar/chart-sidebar.component'
import { ResultTableComponent } from './result-table/result-table.component'
import { StatusBarComponent } from './status-bar/status-bar.component'
@Component({
selector: 'app-browse',
templateUrl: './browse.component.html',
})
export class BrowseComponent {
export class BrowseComponent implements AfterViewInit {
@HostBinding('class.contents') contents = true
@ViewChild('resultTable', { static: true }) resultTable: ResultTableComponent
@ViewChild('chartSidebar', { static: true }) chartSidebar: ChartSidebarComponent
@ViewChild('statusBar', { static: true }) statusBar: StatusBarComponent
@ViewChild('resultTableDiv', { static: true }) resultTableDiv: ElementRef
constructor(private searchService: SearchService) { }
// TODO
// ngAfterViewInit() {
// const $tableColumn = $('#table-column')
// $tableColumn.on('scroll', () => {
// const pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight
// const max = $tableColumn[0].scrollHeight
// if (pos >= max - 5) {
// this.searchService.updateScroll()
// }
// })
// this.searchService.onNewSearch(() => {
// $tableColumn.scrollTop(0)
// })
// }
ngAfterViewInit() {
this.searchService.newSearch.subscribe(() => {
this.resultTableDiv.nativeElement.scrollTop = 0
})
}
}