@@ -30,14 +30,16 @@ export interface AriaTabProps extends AriaLabelingProps {
3030 shouldSelectOnPressUp ?: boolean
3131}
3232
33- export interface TabListProps < T > extends CollectionBase < T > , Omit < SingleSelection , 'disallowEmptySelection' | 'selectedKey' | 'onSelectionChange' > {
33+ export interface TabListProps < T > extends CollectionBase < T > , Omit < SingleSelection , 'disallowEmptySelection' | 'selectedKey' | 'defaultSelectedKeys' | ' onSelectionChange'> {
3434 /**
3535 * Whether the TabList is disabled.
3636 * Shows that a selection exists, but is not available in that circumstance.
3737 */
3838 isDisabled ?: boolean ,
3939 /** The currently selected key in the collection (controlled). */
4040 selectedKey ?: Key ,
41+ /** The initial selected keys in the collection (uncontrolled). */
42+ defaultSelectedKey ?: Key ,
4143 /** Handler that is called when the selection changes. */
4244 onSelectionChange ?: ( key : Key ) => void
4345}
@@ -62,7 +64,7 @@ export interface AriaTabPanelProps extends Omit<DOMProps, 'id'>, AriaLabelingPro
6264 id ?: Key
6365}
6466
65- export interface SpectrumTabsProps < T > extends AriaTabListBase , Omit < SingleSelection , 'disallowEmptySelection' | 'selectedKey' | 'onSelectionChange' > , DOMProps , StyleProps {
67+ export interface SpectrumTabsProps < T > extends AriaTabListBase , Omit < SingleSelection , 'disallowEmptySelection' | 'selectedKey' | 'defaultSelectedKey' | ' onSelectionChange'> , DOMProps , StyleProps {
6668 /** The children of the `<Tabs>` element. Should include `<TabList>` and `<TabPanels>` elements. */
6769 children : ReactNode ,
6870 /** The item objects for each tab, for dynamic collections. */
@@ -79,6 +81,8 @@ export interface SpectrumTabsProps<T> extends AriaTabListBase, Omit<SingleSelect
7981 density ?: 'compact' | 'regular' ,
8082 /** The currently selected key in the collection (controlled). */
8183 selectedKey ?: Key ,
84+ /** The initial selected keys in the collection (uncontrolled). */
85+ defaultSelectedKey ?: Key ,
8286 /** Handler that is called when the selection changes. */
8387 onSelectionChange ?: ( key : Key ) => void
8488}
0 commit comments