File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
packages/@headlessui-react/src/components/combobox Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,31 @@ describe('Rendering', () => {
575
575
assertComboboxList ( { state : ComboboxState . InvisibleUnmounted } )
576
576
} )
577
577
)
578
+
579
+ it (
580
+ 'should not crash when the `Combobox` still contains a `nullable` prop' ,
581
+ suppressConsoleLogs ( async ( ) => {
582
+ let data = [
583
+ { id : 1 , name : 'alice' , label : 'Alice' } ,
584
+ { id : 2 , name : 'bob' , label : 'Bob' } ,
585
+ { id : 3 , name : 'charlie' , label : 'Charlie' } ,
586
+ ]
587
+
588
+ render (
589
+ < Combobox nullable >
590
+ < Combobox . Input onChange = { NOOP } />
591
+ < Combobox . Button />
592
+ < Combobox . Options >
593
+ { data . map ( ( person ) => (
594
+ < Combobox . Option key = { person . id } value = { person } >
595
+ { person . label }
596
+ </ Combobox . Option >
597
+ ) ) }
598
+ </ Combobox . Options >
599
+ </ Combobox >
600
+ )
601
+ } )
602
+ )
578
603
} )
579
604
580
605
describe ( 'Combobox.Input' , ( ) => {
You can’t perform that action at this time.
0 commit comments