Skip to content

Commit

Permalink
OPIK-602 [UX improvements] Allow IDs to grow when column is resized (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
andriidudar authored Dec 16, 2024
1 parent f049b81 commit ec3a3e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useCallback } from "react";
import truncate from "lodash/truncate";
import { CellContext } from "@tanstack/react-table";
import { Copy } from "lucide-react";
import copy from "clipboard-copy";
Expand Down Expand Up @@ -32,7 +31,7 @@ const IdCell = (context: CellContext<unknown, string>) => {
>
<TooltipWrapper content={value}>
<div className="flex max-w-full items-center">
{truncate(value, { length: 9 })}
<div className="truncate">{value}</div>
<Button
size="icon-xs"
variant="ghost"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { useCallback } from "react";
import { CellContext } from "@tanstack/react-table";
import { Copy } from "lucide-react";
import copy from "clipboard-copy";

import CellWrapper from "@/components/shared/DataTableCells/CellWrapper";
import { Button } from "@/components/ui/button";
import truncate from "lodash/truncate";
import { Copy } from "lucide-react";
import TooltipWrapper from "@/components/shared/TooltipWrapper/TooltipWrapper";
import copy from "clipboard-copy";
import { useToast } from "@/components/ui/use-toast";
import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -46,7 +45,7 @@ const LinkCell = <TData,>(context: CellContext<TData, unknown>) => {
className="block truncate px-0 leading-8"
onClick={() => callback(context.row.original)}
>
{asId ? truncate(value, { length: 9 }) : value}
{value}
</Button>
<Button
size="icon-xs"
Expand Down

0 comments on commit ec3a3e4

Please sign in to comment.