fix(web): don't apply break-all when EditableCell has a custom renderView

The break-all on the value span was added so long URLs (link column)
wrap inside the narrow mobile cards. But it was also forcing
character-by-character breaks inside the StatusBadge (e.g., 'available'
splitting into 'ava\nila\nble' on narrow screens). Skip break-all when
renderView is provided — those callers render their own atomic widgets
(badges) that should never break.
This commit is contained in:
yiekheng 2026-05-03 10:19:02 +08:00
parent d94dfc7f9a
commit eb297e977e

View File

@ -84,7 +84,9 @@ export default function EditableCell({
aria-label={label ? `Edit ${label}` : undefined}
className="group flex w-full min-w-0 items-center gap-2 -mx-2 rounded-md px-2 py-1 text-left font-mono text-[13px] text-zinc-900 transition-colors hover:bg-zinc-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-zinc-900"
>
<span className="min-w-0 flex-1 break-all">
<span
className={`min-w-0 flex-1 ${renderView ? "" : "break-all"}`}
>
{renderView
? renderView(value)
: value || <em className="not-italic text-zinc-400"></em>}