Skip to content

Commit e1b72a7

Browse files
kp047ireidbarber
andauthored
Set default value for type parameter in SelectProps (#7014)
Co-authored-by: Reid Barber <[email protected]>
1 parent 9152d83 commit e1b72a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-aria-components/src/Select.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ export interface SelectRenderProps {
6262
isRequired: boolean
6363
}
6464

65-
export interface SelectProps<T extends object> extends Omit<AriaSelectProps<T>, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior' | 'items'>, RACValidation, RenderProps<SelectRenderProps>, SlotProps {}
65+
export interface SelectProps<T extends object = {}> extends Omit<AriaSelectProps<T>, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior' | 'items'>, RACValidation, RenderProps<SelectRenderProps>, SlotProps {}
6666

6767
export const SelectContext = createContext<ContextValue<SelectProps<any>, HTMLDivElement>>(null);
6868
export const SelectStateContext = createContext<SelectState<unknown> | null>(null);
6969

70-
function Select<T extends object>(props: SelectProps<T>, ref: ForwardedRef<HTMLDivElement>) {
70+
function Select<T extends object = {}>(props: SelectProps<T>, ref: ForwardedRef<HTMLDivElement>) {
7171
[props, ref] = useContextProps(props, ref, SelectContext);
7272
let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;
7373
let content = useMemo(() => (

0 commit comments

Comments
 (0)