File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,8 @@ class Select extends React.Component {
1048
1048
sel . push ( menuItem ) ;
1049
1049
menuItems . push ( menuItem ) ;
1050
1050
}
1051
- if ( tags && ! child . props . disabled ) {
1051
+
1052
+ if ( tags ) {
1052
1053
childrenKeys . push ( childValue ) ;
1053
1054
}
1054
1055
} ) ;
Original file line number Diff line number Diff line change @@ -703,6 +703,16 @@ describe('Select', () => {
703
703
expect ( wrapper . find ( 'li' ) . text ( ) ) . toEqual ( '1' ) ;
704
704
} ) ;
705
705
706
+ it ( 'should include disabled item in options' , ( ) => {
707
+ const wrapper = mount (
708
+ < Select tags open value = { [ 'name1' ] } >
709
+ < Option key = "name1" disabled > name1</ Option >
710
+ < Option key = "name2" > name2</ Option >
711
+ </ Select >
712
+ ) ;
713
+ expect ( wrapper . find ( 'li.rc-select-dropdown-menu-item' ) ) . toHaveLength ( 2 ) ;
714
+ } ) ;
715
+
706
716
it ( 'renders not found when search result is empty' , ( ) => {
707
717
const wrapper = mount (
708
718
< Select open >
You can’t perform that action at this time.
0 commit comments