Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ interface WorkItemsSearchProps {
placeholder: string;
label: string;
className?: string;
/** Extends the positioning wrapper (the icon anchors to it), not the input. */
containerClassName?: string;
}

export function WorkItemsSearch({
Expand All @@ -18,6 +20,7 @@ export function WorkItemsSearch({
placeholder,
label,
className,
containerClassName,
}: WorkItemsSearchProps) {
const inputRef = useRef<HTMLInputElement>(null);

Expand All @@ -31,7 +34,9 @@ export function WorkItemsSearch({
);

return (
<div className="relative w-full @4xl:w-56 @6xl:w-64">
<div
className={cn("relative w-full @4xl:w-56 @6xl:w-64", containerClassName)}
>
<HiOutlineMagnifyingGlass className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
ref={inputRef}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Badge } from "@superset/ui/badge";
import { cn } from "@superset/ui/utils";
import { memo } from "react";
import { LuGitBranch, LuLaptop, LuMonitor } from "react-icons/lu";
import { V2WorkspaceContextMenu } from "renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspaceContextMenu";
import { WorkspaceChecksDot } from "renderer/routes/_authenticated/_dashboard/v2-workspaces/components/WorkspaceChecksDot";
Expand All @@ -12,7 +13,9 @@ interface V2WorkspacesBoardCardProps {
workspace: AccessibleV2Workspace;
}

export function V2WorkspacesBoardCard({
// Memoized for the same reason as V2WorkspaceRow: board-wide filter changes
// must not re-render every card.
export const V2WorkspacesBoardCard = memo(function V2WorkspacesBoardCard({
workspace,
}: V2WorkspacesBoardCardProps) {
// Archived tombstones have no worktree or terminals left — no navigation
Expand All @@ -27,7 +30,7 @@ export function V2WorkspacesBoardCard({
)}
</V2WorkspaceContextMenu>
);
}
});

function BoardCardBody({
workspace,
Expand Down
Loading
Loading