File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,8 @@ export class DropDownMenu extends React.Component<DropDownMenuProps, DropDownMen
130130 this . addBlurEvent . cleanEvent ( ) ;
131131 }
132132
133- toggleShowList = ( e : React . SyntheticEvent < HTMLDivElement > ) => {
133+ toggleShowList = ( currentValue : string ) => {
134134 const { currentValues, showList } = this . state ;
135- const valueNode = e . currentTarget . children [ 0 ] as any ;
136- const currentValue = valueNode . innerText ;
137135 if ( showList ) {
138136 currentValues . unshift ( ...currentValues . splice ( currentValues . indexOf ( currentValue ) , 1 ) ) ;
139137 }
@@ -205,7 +203,7 @@ export class DropDownMenu extends React.Component<DropDownMenuProps, DropDownMen
205203 height : ( isCurrent || showList ) ? itemHeight : 0 ,
206204 background : ( isCurrent && showList ) ? theme . listAccentLow : "none"
207205 } }
208- onClick = { this . toggleShowList }
206+ onClick = { ( ) => this . toggleShowList ( value ) }
209207 onMouseEnter = { ! showList ? itemAttributes . onMouseEnter : ( e ) => {
210208 e . currentTarget . style . background = isCurrent ? theme . listAccentMedium : theme . useFluentDesign ? theme . listLow : theme . chromeMedium ;
211209 itemAttributes . onMouseEnter ( e ) ;
You can’t perform that action at this time.
0 commit comments