mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Mark selected row as active
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bridge",
|
||||
"version": "0.0.0",
|
||||
"version": "0.0.1",
|
||||
"description": "A Clone Hero library management tool with built in chart searching and downloading.",
|
||||
"homepage": "https://github.com/Geomitron/Bridge",
|
||||
"license": "GPL-3.0",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#tableRow
|
||||
*ngFor="let result of results"
|
||||
(click)="onRowClicked(result)"
|
||||
[class.active]="activeRowID == result.id"
|
||||
[result]="result"></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -18,6 +18,7 @@ export class ResultTableComponent implements OnInit {
|
||||
@ViewChildren('tableRow') tableRows: QueryList<ResultTableRowComponent>
|
||||
|
||||
results: SongResult[]
|
||||
activeRowID: number = null
|
||||
|
||||
constructor(private searchService: SearchService, private selectionService: SelectionService) { }
|
||||
|
||||
@@ -27,11 +28,13 @@ export class ResultTableComponent implements OnInit {
|
||||
})
|
||||
|
||||
this.searchService.onSearchChanged(results => {
|
||||
this.activeRowID = null
|
||||
this.results = results
|
||||
})
|
||||
}
|
||||
|
||||
onRowClicked(result: SongResult) {
|
||||
this.activeRowID = result.id
|
||||
this.rowClicked.emit(result)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user