File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
packages/@react-spectrum/s2 Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ const ComboboxInner = forwardRef(function ComboboxInner(props: ComboBoxProps<any
433
433
description : descriptionMessage ,
434
434
errorMessage,
435
435
children,
436
+ defaultItems,
436
437
items,
437
438
size = 'M' ,
438
439
labelPosition = 'top' ,
@@ -555,10 +556,10 @@ const ComboboxInner = forwardRef(function ComboboxInner(props: ComboBoxProps<any
555
556
</ UNSTABLE_ListBoxLoadingSentinel >
556
557
) ;
557
558
558
- if ( typeof children === 'function' && items ) {
559
+ if ( typeof children === 'function' ) {
559
560
renderer = (
560
561
< >
561
- < Collection items = { items } >
562
+ < Collection items = { items ?? defaultItems } >
562
563
{ children }
563
564
</ Collection >
564
565
{ listBoxLoadingCircle }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export const Dynamic: Story = {
95
95
) ,
96
96
args : {
97
97
label : 'Favorite ice cream flavor' ,
98
- items
98
+ defaultItems : items
99
99
}
100
100
} ;
101
101
@@ -106,7 +106,7 @@ function VirtualizedCombobox(props) {
106
106
}
107
107
108
108
return (
109
- < ComboBox { ...props } items = { items } >
109
+ < ComboBox { ...props } defaultItems = { items } >
110
110
{ ( item ) => < ComboBoxItem id = { ( item as IExampleItem ) . id } textValue = { ( item as IExampleItem ) . label } > { ( item as IExampleItem ) . label } </ ComboBoxItem > }
111
111
</ ComboBox >
112
112
) ;
You can’t perform that action at this time.
0 commit comments