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 {
10481048 sel . push ( menuItem ) ;
10491049 menuItems . push ( menuItem ) ;
10501050 }
1051- if ( tags && ! child . props . disabled ) {
1051+
1052+ if ( tags ) {
10521053 childrenKeys . push ( childValue ) ;
10531054 }
10541055 } ) ;
Original file line number Diff line number Diff line change @@ -703,6 +703,16 @@ describe('Select', () => {
703703 expect ( wrapper . find ( 'li' ) . text ( ) ) . toEqual ( '1' ) ;
704704 } ) ;
705705
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+
706716 it ( 'renders not found when search result is empty' , ( ) => {
707717 const wrapper = mount (
708718 < Select open >
You can’t perform that action at this time.
0 commit comments