/** * @description * * ::: only-for javascript * Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__. * ::: * * ::: only-for react * This page lists all the **Handsontable hooks** – callbacks that let you react before or after an action occurs. * * Read more on the [Events and hooks](@/guides/getting-started/events-and-hooks/events-and-hooks.md) page. * ::: * * @example * * ::: only-for javascript * ```js * // using events as callbacks * ... * const hot1 = new Handsontable(document.getElementById('example1'), { * afterChange: function(changes, source) { * $.ajax({ * url: "save.php', * data: change * }); * } * }); * ... * ``` * ::: * * ::: only-for react * ```jsx * { * fetch('save.php', { * method: 'POST', * headers: { * 'Accept': 'application/json', * 'Content-Type': 'application/json' * }, * body: JSON.stringify(changes) * }); * }} * /> * ::: * * ::: only-for angular * ```ts * settings = { * afterChange: (changes, source) => { * changes?.forEach(([row, prop, oldValue, newValue]) => { * // Some logic... * }); * }, * }; * ``` * * ```html * * ``` * ::: * * ::: only-for javascript * ```js * // using events as plugin hooks * ... * const hot1 = new Handsontable(document.getElementById('example1'), { * myPlugin: true * }); * * const hot2 = new Handsontable(document.getElementById('example2'), { * myPlugin: false * }); * * // global hook * Handsontable.hooks.add('afterChange', function() { * // Fired twice - for hot1 and hot2 * if (this.getSettings().myPlugin) { * // function body - will only run for hot1 * } * }); * * // local hook (has same effect as a callback) * hot2.addHook('afterChange', function() { * // function body - will only run in #example2 * }); * ``` * ::: * * ::: only-for react * ```jsx * const hotRef1 = useRef(null); * const hotRef2 = useRef(null); * * // Using events as plugin hooks: * ... * * } */ export declare const REMOVED_HOOKS: Map; /** * The list of the hooks which are deprecated. The warning message is printed out in * the developer console when the hook is used. * * The Map key is represented by hook name and its value keeps message which whould be * printed out when the hook is used. * * Usage: * ```js * ... * New Map([ * ['beforeColumnExpand', 'The plugin hook "beforeColumnExpand" is deprecated. Use "beforeColumnExpand2" instead.'], * ]) * ... * ``` * * * @type {Map} */ export declare const DEPRECATED_HOOKS: Map;