Skip to content

Commit a6aaf4a

Browse files
committed
chore: Add selectTriggerRef prop to 'Select' component
1 parent 2635f4e commit a6aaf4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

features/@app-core/forms/Select.styled.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ export const SelectContent = forwardRef<
191191
)}
192192
style={{
193193
maxWidth: Math.min(400, Dimensions.get('window').width - 40),
194-
backgroundColor: getThemeColor('--popover'),
195194
}}
196195
asChild
197196
>
@@ -390,7 +389,7 @@ export const SelectProps = schema('SelectProps', {
390389
className: z.string().optional(),
391390
triggerClassName: z.string().optional(),
392391
valueClassName: z.string().optional(),
393-
contentClassName: z.string().default('w-full bg-white'),
392+
contentClassName: z.string().default('w-full'),
394393
})
395394

396395
export type SelectProps<T extends string = string> = Omit<
@@ -399,6 +398,7 @@ export type SelectProps<T extends string = string> = Omit<
399398
> & {
400399
value: T,
401400
children?: ReactNode,
401+
selectTriggerRef?: LegacyRef<ElementRef<typeof SP.SelectTrigger>>,
402402
onChange: (value: T) => void,
403403
}
404404

@@ -461,6 +461,7 @@ export const createSelectComponent = <T extends string = string>() => Object.ass
461461
>
462462
<View>
463463
<SelectTrigger
464+
ref={props.selectTriggerRef}
464465
key={`select-trigger-${selectValueKey}`}
465466
className={cn('w-full', props.triggerClassName)}
466467
disabled={disabled}

0 commit comments

Comments
 (0)