import { useCallback } from 'react' ; import { ValueType , UseSelectProps } from '../../../types' ; import useSelectHandler from '../use-select-handler' ; const useResetClickHandler = < T extends ValueType , M extends boolean = false > ( { selectState : { close } , handleSelect } ) => useCallback ( ( event ) => { event . stopPropagation ( ) ; close ( ) ; handleSelect ( event , null ) ; } , [ close , handleSelect ] ) ; export default useResetClickHandler ;