Skip to content

Conversation

devongovett
Copy link
Member

A few minor API updates and small fixes.

  • Changed value to id to match other collection components
  • Added textValue and aria-label as a prop
  • Fixed disabled color
  • Removed colored illustrations from example for now (need to discuss with design)
  • Made the grid fixed width and centered the items in the available space so the gaps don't differ between the horizontal and vertical directions

@rspbot
Copy link

rspbot commented Aug 22, 2025

@rspbot
Copy link

rspbot commented Aug 22, 2025

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:SelectBox

 SelectBox {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
+  aria-label?: string
   children: ReactNode
+  id?: Key
   isDisabled?: boolean
   styles?: StylesProp
-  value: string
+  textValue?: string
 }

/@react-spectrum/s2:SelectBoxGroup

 SelectBoxGroup <T extends {}> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children: ReactNode
   defaultSelectedKeys?: 'all' | Iterable<Key>
   disabledKeys?: Iterable<Key>
   disallowEmptySelection?: boolean
   escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
   id?: string
   isDisabled?: boolean
   items?: Iterable<T>
   onBlur?: (FocusEvent<Target>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onSelectionChange?: (Selection) => void
   orientation?: Orientation = 'vertical'
   selectedKeys?: 'all' | Iterable<Key>
   selectionMode?: 'single' | 'multiple' = 'single'
-  shouldFocusWrap?: boolean
-  shouldSelectOnPressUp?: boolean
   slot?: string | null
   styles?: StylesProp
 }

/@react-spectrum/s2:SelectBoxProps

 SelectBoxProps {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
+  aria-label?: string
   children: ReactNode
+  id?: Key
   isDisabled?: boolean
   styles?: StylesProp
-  value: string
+  textValue?: string
 }

/@react-spectrum/s2:SelectBoxGroupProps

 SelectBoxGroupProps <T> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children: ReactNode
   defaultSelectedKeys?: 'all' | Iterable<Key>
   disabledKeys?: Iterable<Key>
   disallowEmptySelection?: boolean
   escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
   id?: string
   isDisabled?: boolean
   items?: Iterable<T>
   onBlur?: (FocusEvent<Target>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onSelectionChange?: (Selection) => void
   orientation?: Orientation = 'vertical'
   selectedKeys?: 'all' | Iterable<Key>
   selectionMode?: 'single' | 'multiple' = 'single'
-  shouldFocusWrap?: boolean
-  shouldSelectOnPressUp?: boolean
   slot?: string | null
   styles?: StylesProp
 }

@yihuiliao yihuiliao added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit 62eb6ce Aug 22, 2025
32 checks passed
@yihuiliao yihuiliao deleted the selectbox-audit branch August 22, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants