File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { Icon as SUIIcon } from 'semantic-ui-react' ;
33import { SemanticDatepickerProps } from '../types' ;
4- import { keys } from '../utils' ;
54
65type CustomIconProps = {
76 clearIcon : SemanticDatepickerProps [ 'clearIcon' ] ;
@@ -16,12 +15,6 @@ const CustomIcon = ({
1615 isClearIconVisible,
1716 onClear,
1817} : CustomIconProps ) => {
19- const onKeydown = ( evt : KeyboardEvent ) => {
20- if ( evt . keyCode === keys . enter || evt . keyCode === keys . space ) {
21- onClear ( ) ;
22- }
23- } ;
24-
2518 if ( isClearIconVisible && clearIcon && React . isValidElement ( clearIcon ) ) {
2619 return React . cloneElement ( clearIcon , {
2720 'data-testid' : 'datepicker-clear-icon' ,
@@ -36,10 +29,7 @@ const CustomIcon = ({
3629 data-testid = "datepicker-clear-icon"
3730 link
3831 name = { clearIcon }
39- role = "button"
40- tabIndex = "0"
4132 onClick = { onClear }
42- onKeyDown = { onKeydown }
4333 />
4434 ) ;
4535 }
You can’t perform that action at this time.
0 commit comments