File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
packages/shared/widget-plugin-dropdown-filter/src/controls/select Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ import { useSelect, UseSelectProps } from "downshift";
33import { observer } from "mobx-react-lite" ;
44import React , { createElement , useRef } from "react" ;
55import { OptionWithState } from "../../typings/OptionWithState" ;
6- import { ClearButton } from "../base/ClearButton" ;
76import { OptionsWrapper } from "../base/OptionsWrapper" ;
87import { useFloatingMenu } from "../hooks/useFloatingMenu" ;
9- import { Arrow , classes } from "../picker-primitives" ;
8+ import { Arrow , classes , Cross } from "../picker-primitives" ;
109
1110interface SelectProps {
1211 value : string ;
@@ -52,15 +51,20 @@ export const Select = observer(function Select(props: SelectProps): React.ReactE
5251 >
5352 < span className = { cls . toggle } > { props . value } </ span >
5453 < div className = { `${ cls . root } -controls` } >
55- < ClearButton
56- cls = { cls }
57- onClick = { ( ) => {
58- props . onClear ( ) ;
59- toggleRef . current ?. focus ( ) ;
60- } }
61- showSeparator = { false }
62- visible = { showClear }
63- />
54+ { showClear && (
55+ < div
56+ className = { cls . clear }
57+ tabIndex = { - 1 }
58+ aria-label = "Clear combobox"
59+ onClick = { event => {
60+ event . stopPropagation ( ) ;
61+ props . onClear ( ) ;
62+ toggleRef . current ?. focus ( ) ;
63+ } }
64+ >
65+ < Cross />
66+ </ div >
67+ ) }
6468 < Arrow className = { cls . stateIcon } />
6569 </ div >
6670 </ button >
You can’t perform that action at this time.
0 commit comments