mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-20 05:04:24 +00:00
revert: tint clickable table row hover
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
9d8ddfac9d
commit
ed788c99fa
2 changed files with 1 additions and 20 deletions
|
|
@ -765,25 +765,6 @@ describe("DataTable pinned columns", () => {
|
|||
});
|
||||
|
||||
describe("DataTable row activation", () => {
|
||||
it("uses full muted hover tint only for clickable rows", () => {
|
||||
render(
|
||||
<>
|
||||
<DataTable
|
||||
data={[person("clickable", "Clickable")]}
|
||||
columns={nameCellColumns}
|
||||
onRowClick={vi.fn()}
|
||||
getRowLabel={(row) => `Open person ${row.name}`}
|
||||
/>
|
||||
<DataTable data={[person("static", "Static")]} columns={nameCellColumns} />
|
||||
</>,
|
||||
);
|
||||
|
||||
const clickableRow = screen.getByRole("row", { name: "Open person Clickable" });
|
||||
expect(clickableRow).toHaveClass("hover:bg-muted");
|
||||
expect(clickableRow).not.toHaveClass("hover:bg-muted/50");
|
||||
expect(screen.getByRole("row", { name: "Static" })).not.toHaveClass("hover:bg-muted");
|
||||
});
|
||||
|
||||
it("fires onRowClick exactly once from a plain cell but not from interactive elements", async () => {
|
||||
const user = userEvent.setup();
|
||||
const onRowClick = vi.fn();
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ function DataTableBodyRow<TData>({
|
|||
aria-label={clickable ? getRowLabel?.(row.original) : undefined}
|
||||
className={cn(
|
||||
clickable
|
||||
? "cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-primary focus-visible:-outline-offset-2"
|
||||
? "cursor-pointer focus-visible:outline-2 focus-visible:outline-primary focus-visible:-outline-offset-2"
|
||||
: "",
|
||||
size === "compact" ? "h-8" : "",
|
||||
rowClassName?.(row),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue