feat: multiple changes

Signed-off-by: Avior <git@avior.me>
This commit is contained in:
2024-09-09 14:27:46 +02:00
parent d8f203f434
commit 3e91597dca
31 changed files with 216 additions and 223 deletions

View File

@ -87,8 +87,8 @@ export function setOnTableClick(table: HTMLTableElement, fn: (row: number, cell:
table.querySelectorAll<HTMLTableCellElement>('td').forEach((it) => {
it.addEventListener('click', () => {
const row = it.parentElement as HTMLTableRowElement
const rowIdx = parseInt(row.dataset.row as string)
const cellIdx = parseInt(it.dataset.cell as string)
const rowIdx = Number.parseInt(row.dataset.row as string)
const cellIdx = Number.parseInt(it.dataset.cell as string)
fn(rowIdx, cellIdx)
})
})