@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
31 lines (30 loc) • 1.28 kB
TypeScript
import type { ReactTableHooks } from '../types/index.js';
interface useOnColumnResizeOptions {
/**
* If `liveUpdate` is `true`, the resize function will fire every time the width has changed depending on the `options.wait` delay.
*/
liveUpdate?: boolean;
/**
* The number of milliseconds for which the calls are to be delayed. __Defaults to `100`__.
*
* __Note:__ If `liveUpdate` is `true`, this option has no effect.
*/
wait?: number;
}
type useOnColumnResizeFunc = (e: {
columnWidth: number;
header: Record<string, any>;
}) => void;
/**
* Plugin Hook that adds a callback which is fired on column resize.
*
* @param {event} callback Fired when the column is resized by dragging the "Resizer".
* @param {Object=} options Additional options.
* @param {number=} options.wait If `liveUpdate` is `true`, the resize function will fire every time the width has changed depending on the `options.wait` delay.
* @param {boolean=} options.liveUpdate The number of milliseconds for which the calls are to be delayed. Defaults to `100`.
*/
export declare const useOnColumnResize: (callback: useOnColumnResizeFunc, options?: useOnColumnResizeOptions) => {
(hooks: ReactTableHooks): void;
pluginName: string;
};
export {};