mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 10:35:09 +00:00
Improve keyboard navigation
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<td>
|
<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>
|
||||||
<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 }}
|
<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 { ChartData } from '../../../../../../src-shared/interfaces/search.interface'
|
||||||
import { SelectionService } from '../../../../core/services/selection.service'
|
import { SelectionService } from '../../../../core/services/selection.service'
|
||||||
@@ -10,6 +10,8 @@ import { SelectionService } from '../../../../core/services/selection.service'
|
|||||||
export class ResultTableRowComponent implements OnInit {
|
export class ResultTableRowComponent implements OnInit {
|
||||||
@Input() song: ChartData[]
|
@Input() song: ChartData[]
|
||||||
|
|
||||||
|
@Output() rowFocused: EventEmitter<string> = new EventEmitter()
|
||||||
|
|
||||||
constructor(private selectionService: SelectionService) { }
|
constructor(private selectionService: SelectionService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<tr
|
<tr
|
||||||
app-result-table-row
|
app-result-table-row
|
||||||
(click)="onRowClicked(song)"
|
(click)="onRowClicked(song)"
|
||||||
|
(rowFocused)="onRowClicked(song)"
|
||||||
[class.!bg-neutral]="activeSong === song"
|
[class.!bg-neutral]="activeSong === song"
|
||||||
[class.!text-neutral-content]="activeSong === song"
|
[class.!text-neutral-content]="activeSong === song"
|
||||||
[song]="song"></tr>
|
[song]="song"></tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user