Skip to content

Commit 8205fae

Browse files
fix(resource): move "Clear sort" to top of the sort menu
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c1bca47 commit 8205fae

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,15 @@ export const SortDropdown = memo(function SortDropdown({
290290
alignOffset={RESOURCE_MENU_EDGE_OFFSET}
291291
className='max-h-[var(--radix-dropdown-menu-content-available-height,400px)]'
292292
>
293+
{active && onClear && (
294+
<>
295+
<DropdownMenuItem onSelect={onClear}>
296+
<X />
297+
Clear sort
298+
</DropdownMenuItem>
299+
<DropdownMenuSeparator />
300+
</>
301+
)}
293302
{options.map((option) => {
294303
const isActive = active?.column === option.id
295304
const Icon = option.icon
@@ -314,15 +323,6 @@ export const SortDropdown = memo(function SortDropdown({
314323
</DropdownMenuItem>
315324
)
316325
})}
317-
{active && onClear && (
318-
<>
319-
<DropdownMenuSeparator />
320-
<DropdownMenuItem onSelect={onClear}>
321-
<X />
322-
Clear sort
323-
</DropdownMenuItem>
324-
</>
325-
)}
326326
</DropdownMenuContent>
327327
</DropdownMenu>
328328
)

0 commit comments

Comments
 (0)