mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Improve keyboard navigation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<td>
|
||||
<input type="checkbox" class="checkbox" (click)="$event.stopPropagation()" [(ngModel)]="selected" />
|
||||
<input type="checkbox" class="checkbox" (click)="$event.stopPropagation()" (focus)="rowFocused.emit()" [(ngModel)]="selected" />
|
||||
</td>
|
||||
<td>
|
||||
<span *ngIf="song.length > 1" class="rounded-sm bg-accent text-accent-content px-1 mr-1 font-bold">{{ song.length }}</span> {{ song[0].name }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||
|
||||
import { ChartData } from '../../../../../../src-shared/interfaces/search.interface'
|
||||
import { SelectionService } from '../../../../core/services/selection.service'
|
||||
@@ -10,6 +10,8 @@ import { SelectionService } from '../../../../core/services/selection.service'
|
||||
export class ResultTableRowComponent implements OnInit {
|
||||
@Input() song: ChartData[]
|
||||
|
||||
@Output() rowFocused: EventEmitter<string> = new EventEmitter()
|
||||
|
||||
constructor(private selectionService: SelectionService) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<tr
|
||||
app-result-table-row
|
||||
(click)="onRowClicked(song)"
|
||||
(rowFocused)="onRowClicked(song)"
|
||||
[class.!bg-neutral]="activeSong === song"
|
||||
[class.!text-neutral-content]="activeSong === song"
|
||||
[song]="song"></tr>
|
||||
|
||||
Reference in New Issue
Block a user