diff --git a/src/SessionTable.test.tsx b/src/SessionTable.test.tsx index f4821ca..27678b0 100644 --- a/src/SessionTable.test.tsx +++ b/src/SessionTable.test.tsx @@ -41,6 +41,7 @@ describe("SessionTable", () => { expect(screen.getByText("已选择 2 项")).toBeInTheDocument(); expect(screen.getByText("1–2 / 200")).toBeInTheDocument(); expect(screen.queryByRole("checkbox", { name: /选择 (当前页|S-)/ })).not.toBeInTheDocument(); + expect(first).toHaveClass("session-data-row"); }); it("筛选和排序产生显式查询意图", () => { diff --git a/src/SessionTable.tsx b/src/SessionTable.tsx index 025c4f4..2f59e93 100644 --- a/src/SessionTable.tsx +++ b/src/SessionTable.tsx @@ -138,7 +138,7 @@ export function SessionTable({ rows, state, capabilities, page, onStateChange, o })} -
{rows.map((session, index) =>
{ if (element) rowRefs.current.set(session.id, element); else rowRefs.current.delete(session.id); }} onFocus={() => state.focusedSessionId !== session.id && onStateChange({ ...state, focusedSessionId: session.id })} onClick={(event) => handleRowClick(event, index, session.id)} onKeyDown={(event) => handleRowKeyDown(event, index, session.id)}> +
{rows.map((session, index) =>
{ if (element) rowRefs.current.set(session.id, element); else rowRefs.current.delete(session.id); }} onFocus={() => state.focusedSessionId !== session.id && onStateChange({ ...state, focusedSessionId: session.id })} onClick={(event) => handleRowClick(event, index, session.id)} onKeyDown={(event) => handleRowKeyDown(event, index, session.id)}> {visible.has("status") &&