"use client"; import { forwardRef, useRef } from "react"; import { mergeRefs } from "../../utils/merge-refs"; import { Props as BaseProps, default as Input } from "./Input"; import { ClearButton } from "./clear-button"; interface Props extends Omit {} const ClearableInput = forwardRef( (props, externalRef) => { const inputRef = useRef(null); return ( { if (inputRef.current) { inputRef.current.value = ""; inputRef.current.focus(); console.log(props); props.onChange?.({ target: { value: "" }, } as any); } }} /> ) : null } suffixContainer={false} suffixStyling={false} /> ); }, ); export default ClearableInput;