Skip to content

Commit 01e2e1a

Browse files
fix(resource): left-align table filter/sort when there's no search
The unconditional ml-auto from #5117 right-aligned the embedded table editor's filter/sort cluster, which has no search bar. Only push the aside + filter/sort group right when a search occupies the left; without a search it stays left-aligned as before.
1 parent 63a3e6d commit 01e2e1a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options

apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ interface ResourceOptionsProps {
8484
filterTags?: FilterTag[]
8585
/**
8686
* Lightweight control rendered immediately to the LEFT of the filter/sort
87-
* cluster; the two form one right-aligned group, with or without a search —
88-
* e.g. the knowledge view's connected-source badge or the table editor's
89-
* embedded run/stop control. Keep it to badges/status widgets; primary actions
90-
* belong in the header's `actions`.
87+
* cluster, forming one group with it — e.g. the knowledge view's
88+
* connected-source badge or the table editor's embedded run/stop control. With
89+
* a search the group is pushed right (opposite the search); without one it
90+
* stays left-aligned (the embedded table editor). Keep it to badges/status
91+
* widgets; primary actions belong in the header's `actions`.
9192
*/
9293
aside?: ReactNode
9394
}
@@ -117,7 +118,7 @@ export const ResourceOptions = memo(function ResourceOptions({
117118
<div className={cn('border-[var(--border)] border-b py-2.5', search ? 'px-6' : 'px-4')}>
118119
<div className='flex items-center'>
119120
{search && <SearchSection search={search} />}
120-
<div className='ml-auto flex shrink-0 items-center gap-1.5'>
121+
<div className={cn('flex shrink-0 items-center gap-1.5', search && 'ml-auto')}>
121122
{aside}
122123
<div className='flex items-center'>
123124
{filterTags?.map((tag) => (

0 commit comments

Comments
 (0)