Hi,
I’m trying to render custom component as row Header. I’m using afterGetRowHeader property, but I’m not able to produce the button in the headers. I want the following component as the row Header.
export function Component(props: ComponentProps) {
if (!(props.date && props.func)) {
return null;
}
return (
<Button onClick={() => props.func(props.date)}
type=“link”
disabled={props.disabled}>
{props.date}
);
}
const myFunc = (val: string) => console.log(val);
afterGetRowHeader = {(row, TH) => {
TH = (<Component date={TH.textContent} func={myFunc})
}}
I’m using typescript with React. The Button in the Component is imported from ant design. Thanks