Skip to content

Commit 243d2a3

Browse files
committed
fix(settings): ChipSelect renders above modals + full-width form mode
Raise the ChipSelect menu to --z-popover so it layers above modal surfaces (--z-modal) instead of opening behind them. Add a fullWidth prop that stretches the trigger and right-aligns the chevron for form-field use, and apply it to the workflow MCP-server pickers.
1 parent b3b86c8 commit 243d2a3

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/components/create-workflow-mcp-server-modal/create-workflow-mcp-server-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export function CreateWorkflowMcpServerModal({
103103
searchable
104104
searchPlaceholder='Search workflows...'
105105
disabled={createServerMutation.isPending}
106+
fullWidth
106107
align='start'
107108
displayLabel={
108109
selectedWorkflowIds.length > 0

apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ function ServerDetailView({ workspaceId, serverId, onBack }: ServerDetailViewPro
829829
searchable
830830
searchPlaceholder='Search workflows...'
831831
disabled={addToolMutation.isPending}
832+
fullWidth
832833
align='start'
833834
displayLabel={selectedWorkflow?.name}
834835
/>

apps/sim/components/emcn/components/chip-select/chip-select.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ export interface ChipSelectProps {
6262
allOptionLabel?: string
6363
/** Menu alignment relative to the trigger. */
6464
align?: 'start' | 'center' | 'end'
65+
/**
66+
* Stretch the trigger to fill its container and right-align the chevron —
67+
* use inside form fields. Defaults to a content-width chip (toolbar filters).
68+
*/
69+
fullWidth?: boolean
6570
/** Menu width — 'trigger' matches the trigger, a number is px; defaults to a 160px min. */
6671
dropdownWidth?: 'trigger' | number
6772
/** Max height of the menu in px (defaults to the menu's 240px). */
@@ -110,6 +115,7 @@ export function ChipSelect({
110115
showAllOption = false,
111116
allOptionLabel = 'All',
112117
align = 'end',
118+
fullWidth = false,
113119
dropdownWidth,
114120
maxHeight,
115121
className,
@@ -205,8 +211,8 @@ export function ChipSelect({
205211
disabled={disabled}
206212
aria-label={ariaLabel}
207213
className={cn(
208-
chipVariants({ variant: 'filled', flush: true }),
209-
'max-w-[240px]',
214+
chipVariants({ variant: 'filled', flush: true, fullWidth }),
215+
fullWidth ? 'w-full justify-between' : 'max-w-[240px]',
210216
className
211217
)}
212218
>
@@ -220,7 +226,7 @@ export function ChipSelect({
220226
align={align}
221227
onOpenAutoFocus={searchable ? (e) => e.preventDefault() : undefined}
222228
style={contentStyle}
223-
className={cn('min-w-[160px]', contentClassName)}
229+
className={cn('z-[var(--z-popover)] min-w-[160px]', contentClassName)}
224230
>
225231
{searchable ? (
226232
<DropdownMenuSearchInput

0 commit comments

Comments
 (0)