Skip to content

Commit 9723225

Browse files
snowystingerLFDanLudevongovett
authored
fix: documentation select placeholder default (#7941)
* fix: documentation select placeholder default * Update packages/react-aria-components/src/Select.tsx * update description --------- Co-authored-by: Daniel Lu <dl1644@gmail.com> Co-authored-by: Devon Govett <devongovett@gmail.com>
1 parent 23faef4 commit 9723225

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ 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 {
66+
/**
67+
* Temporary text that occupies the select when it is empty.
68+
* @default 'Select an item' (localized)
69+
*/
70+
placeholder?: string
71+
}
6672

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

0 commit comments

Comments
 (0)