react-select#ClearIndicatorProps TypeScript Examples
The following examples show how to use
react-select#ClearIndicatorProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From admin with MIT License | 6 votes |
ClearIndicator = ({ ...props }: ClearIndicatorProps) => {
if (props.selectProps.menuIsOpen && props.selectProps.isMulti) {
return <></>
}
const {
innerProps: { ref, ...restInnerProps },
} = props
return (
<div
onMouseDown={(e) => {
restInnerProps.onMouseDown(e)
}}
ref={ref}
className="hover:bg-grey-10 text-grey-40 rounded cursor-pointer"
>
<XCircleIcon size={20} />
</div>
)
}