rsuite
Version:
A suite of react components
14 lines (13 loc) • 570 B
TypeScript
import { PickerHandle } from '../internals/Picker/types';
interface FocusEventProps {
isEditing: boolean;
stateOnBlur?: 'save' | 'cancel';
onSave?: (event?: React.FocusEvent | null) => void;
onCancel?: (event?: React.FocusEvent | null) => void;
}
declare const useFocusEvent: ({ isEditing, stateOnBlur, onSave, onCancel }: FocusEventProps) => {
target: import("react").RefObject<HTMLInputElement | PickerHandle | null>;
root: import("react").RefObject<HTMLDivElement | null>;
onBlur: (...args: any[]) => any;
};
export default useFocusEvent;