@progress/kendo-react-common
Version:
React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package
33 lines (32 loc) • 1.23 kB
TypeScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as React from 'react';
/**
* @hidden
*/
export type AsyncFocusBlurArgs<T extends any[]> = {
onFocus?: (...event: T) => void;
onBlur?: (...event: T) => void;
/**
* @hidden
*/
onSyncFocus?: (event: React.FocusEvent<any>) => void;
/**
* @hidden
*/
onSyncBlur?: (event: React.FocusEvent<any>) => void;
};
/**
* An utility function for asynchronous focus/blur handling.
*
* By default, the `onFocus` and `onBlur` callbacks are called every time a child components receives/loses focus.
* Use this utility hook for scenarios where you need to know if the parent has received focus for the first time, or completely lost focus.
*
* @returns
*/
export declare function useAsyncFocusBlur<T extends any[]>({ onFocus, onBlur, onSyncFocus, onSyncBlur }: AsyncFocusBlurArgs<T>): AsyncFocusBlurArgs<T>;