Implemented metadata editing

This commit is contained in:
Ben committed 2026-07-04 14:53:13 +02:00
1 parent cc254e9a9b
commit 279e5ac34f
13 files changed
+943 -35

No files matched your search

+7 -1
View File
@@ -108,9 +108,10 @@ interface Props {
sorting: SortingState
onSortingChange: (s: SortingState) => void
selection?: Selection
onRowContextMenu?: (track: Track, x: number, y: number) => void
}
export function TrackTable({ tracks, sorting, onSortingChange, selection }: Props) {
export function TrackTable({ tracks, sorting, onSortingChange, selection, onRowContextMenu }: Props) {
const table = useReactTable({
data: tracks,
columns,
@@ -191,6 +192,11 @@ export function TrackTable({ tracks, sorting, onSortingChange, selection }: Prop
height: vr.size,
width: '100%',
}}
onContextMenu={(e) => {
if (!onRowContextMenu) return
e.preventDefault()
onRowContextMenu(row.original, e.clientX, e.clientY)
}}
>
{selection ? (
<span className="flex w-10 shrink-0 items-center justify-center">