Since version: v1.5.4
Admin Script
Certain functions of the Table Field can be configured. JavaScript hooks are provided for this purpose and can be applied within a properly enqueued admin script. The following example demonstrates how to enqueue an admin script so it can work with Table Field hooks.
Enqueue Admin Script
add_action( 'acf/input/admin_enqueue_scripts', function() {
wp_enqueue_script(
'table-field-pro-config', // Your script handle
get_template_directory_uri() . '/js/table-field-pro-config.js', // Path to your table field admin script in the theme
array(), // None dependencies
'1.0', // Version of the script
);
});
Once you have created and included the admin script, you can register Table Field hooks in that script using the event listener tableFieldProRegisterHooks. This event fires after the Table Field scripts have been loaded, but before they execute.
Event to Register Table Field Hooks
document.addEventListener('tableFieldProRegisterHooks', function(){
// Add Table Field hooks (filters) here
});
The following hooks (filters) can be used in the tableFieldProRegisterHooks event: