Is it possible to send extra params with a click event via a useRef.
const button = useRef(null)
const handleSelectSearchResult = (query, type, extra) => {
dispatch(search.setSearchQuery(query, type));
extra && handleFocusWhere();
};
<div ref={button} onClick={() => handleSelectSearchResult(name, category)}>
I want to pass the extra param if it is programatically clicked rather than mouse or enter.
button.current.click(send some extra params);