AG Grid - Invoke callbacks from custom header component

This one:

dagcomponentfuncs.ButtonHeader = function (props) {
    return React.createElement(
        'button',
        {
            onClick: () => {
            props.api.gridOptionsService.gridOptions.onCellClicked({value: {'headerClicked': props.column.colId},
            column: props.column.colId,
            rowIndex: null, node: []})},
            className: props.className,
            style: props.style,
        },
        props.displayName)
}

props.api.gridOptionsServer doesnt exist anymore.

You can do a workaround that I posted here:

1 Like