Skip to content

Commit c23d6db

Browse files
author
priyanshu.solanki
committed
fix: layout for delete button next to date picker
- Change delete button from absolute to inline positioning - Add proper column width (w-10) for delete button - Add empty header cell for delete column - Apply fix to both document-tag-entry and knowledge-tag-filters
1 parent 38f46bd commit c23d6db

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ export function DocumentTagEntry({
267267
<tr className='border-b'>
268268
<th className='w-2/5 border-r px-4 py-2 text-center font-medium text-sm'>Tag Name</th>
269269
<th className='w-1/5 border-r px-4 py-2 text-center font-medium text-sm'>Type</th>
270-
<th className='px-4 py-2 text-center font-medium text-sm'>Value</th>
270+
<th className='border-r px-4 py-2 text-center font-medium text-sm'>Value</th>
271+
<th className='w-10' />
271272
</tr>
272273
</thead>
273274
)
@@ -602,10 +603,10 @@ export function DocumentTagEntry({
602603
const canDelete = !isPreview && !disabled
603604

604605
return canDelete ? (
605-
<td className='w-0 p-0'>
606+
<td className='w-10 p-1'>
606607
<Button
607608
variant='ghost'
608-
className='-translate-y-1/2 absolute top-1/2 right-2 h-8 w-8 p-0 opacity-0 group-hover:opacity-100'
609+
className='h-8 w-8 p-0 opacity-0 group-hover:opacity-100'
609610
onClick={() => handleDeleteRow(rowIndex)}
610611
>
611612
<Trash className='h-4 w-4 text-muted-foreground' />

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ export function KnowledgeTagFilters({
262262
<tr className='border-b'>
263263
<th className='w-[35%] border-r px-2 py-2 text-center font-medium text-sm'>Tag</th>
264264
<th className='w-[25%] border-r px-2 py-2 text-center font-medium text-sm'>Operator</th>
265-
<th className='px-2 py-2 text-center font-medium text-sm'>Value</th>
265+
<th className='border-r px-2 py-2 text-center font-medium text-sm'>Value</th>
266+
<th className='w-10' />
266267
</tr>
267268
</thead>
268269
)
@@ -537,11 +538,10 @@ export function KnowledgeTagFilters({
537538
const canDelete = !isPreview && !disabled
538539

539540
return canDelete ? (
540-
<td className='w-0 p-0'>
541+
<td className='w-10 p-1'>
541542
<Button
542543
variant='ghost'
543-
size='icon'
544-
className='-translate-y-1/2 absolute top-1/2 right-2 h-8 w-8 opacity-0 group-hover:opacity-100'
544+
className='h-8 w-8 p-0 opacity-0 group-hover:opacity-100'
545545
onClick={() => handleDeleteRow(rowIndex)}
546546
>
547547
<Trash className='h-4 w-4 text-muted-foreground' />

0 commit comments

Comments
 (0)