diff --git a/packages/@react-spectrum/picker/src/Picker.tsx b/packages/@react-spectrum/picker/src/Picker.tsx index 4ea1c424f18..c8ebda2f9d6 100644 --- a/packages/@react-spectrum/picker/src/Picker.tsx +++ b/packages/@react-spectrum/picker/src/Picker.tsx @@ -55,7 +55,8 @@ function Picker(props: SpectrumPickerProps, ref: DOMRef(props: SpectrumPickerProps, ref: DOMRef ) ) - .add('resize', () => ); + .add('resize', () => ) + .add('autofocus', () => ( + + One + Two + Three + + )); function AsyncLoadingExample() { interface Pokemon { diff --git a/packages/@react-types/select/src/index.d.ts b/packages/@react-types/select/src/index.d.ts index afb5a692530..ece6c0eeef5 100644 --- a/packages/@react-types/select/src/index.d.ts +++ b/packages/@react-types/select/src/index.d.ts @@ -59,5 +59,7 @@ export interface SpectrumPickerProps extends AriaSelectProps, SpectrumLabe /** * The name of the Picker input, used when submitting an HTML form. */ - name?: string + name?: string, + /** Whether the element should receive focus on render. */ + autoFocus?: boolean }