File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -225,18 +225,17 @@ export function Autocomplete<
225
225
}
226
226
227
227
return (
228
- < EndAdornmentContainer >
228
+ < EndAdornmentContainer
229
+ onClick = { ( event ) => event . stopPropagation ( ) }
230
+ onMouseDown = { ( event ) => event . stopPropagation ( ) }
231
+ >
229
232
{ hasClearButton && (
230
- < ClearButton
231
- { ...( getClearProps ( ) as MuiIconButtonProps ) }
232
- onMouseDown = { ( event ) => event . stopPropagation ( ) }
233
- />
233
+ < ClearButton { ...( getClearProps ( ) as MuiIconButtonProps ) } />
234
234
) }
235
235
{ hasPopupIndicator && (
236
236
< PopupIndicator
237
237
popupOpen = { isPopupOpen }
238
238
{ ...( getPopupIndicatorProps ( ) as MuiIconButtonProps ) }
239
- onClick = { undefined }
240
239
/>
241
240
) }
242
241
{ endAdornment }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ interface IconButtonProps {
13
13
tooltipPlacement ?: TooltipProps [ 'placement' ] ;
14
14
iconSx ?: SxProps ;
15
15
containerSx ?: SxProps ;
16
- onClick ?( ) : void ;
16
+ onClick ?: React . MouseEventHandler < HTMLButtonElement > ;
17
17
icon : ReactElement ;
18
18
disabled ?: boolean ;
19
19
hidden ?: boolean ;
@@ -39,7 +39,7 @@ export function IconButton(props: IconButtonProps) {
39
39
sx = { props . iconSx }
40
40
onClick = { ( event ) => {
41
41
event . stopPropagation ( ) ;
42
- props . onClick ?.( ) ;
42
+ props . onClick ?.( event ) ;
43
43
} }
44
44
disabled = { props . disabled }
45
45
data-testid = { props [ 'data-testid' ] }
You can’t perform that action at this time.
0 commit comments