feat(fields): stop click propagation on fields and reduce middle column width

This commit is contained in:
yiling
2026-06-12 11:40:35 +08:00
parent 98bf05a616
commit dc26877dd2
3 changed files with 4 additions and 3 deletions
@@ -377,7 +377,7 @@ export function FileCard({
<label className="text-xs text-muted-foreground tracking-wide">
{field.config?.name}
</label>
<div className="min-h-[28px]">
<div className="min-h-[28px]" onClick={(e) => e.stopPropagation()}>
<FieldRenderer
config={field.config}
value={itemFieldValueMap[field.id!]?.value}
@@ -280,6 +280,7 @@ export function FileListItem({
width: columnSizing?.[field.id!] || 150,
minWidth: columnSizing?.[field.id!] || 150,
}}
onClick={(e) => e.stopPropagation()}
>
<FieldRenderer
config={field.config}
@@ -602,7 +602,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
</div>
{/* Middle Column: Field List */}
<div className="w-100 border-r flex flex-col">
<div className="w-64 border-r flex flex-col">
<div className="p-4 border-b flex items-center justify-between bg-background h-[57px]">
<span className="font-medium text-sm">
{groups.find((g) => g.id === selectedGroup)?.label}
@@ -645,7 +645,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
</div>
{/* Right Column: Config */}
<div className="w-100 bg-background flex flex-col">
<div className="flex-1 bg-background flex flex-col">
<div className="flex-1 overflow-y-auto p-6">{renderConfigEditor()}</div>
{(isCreating || (selectedField && !selectedField.readOnly)) && (
<div className="p-4 border-t flex justify-end gap-2 bg-muted/10">