tooltip allowed on column header? #2938
Unanswered
babycarlitos
asked this question in
Q&A
Replies: 1 comment
-
@babycarlitos you should use custom headerRenderer and pass down the component as per your requirement. headerRenderer will give you all the column details including onSort and sort-directions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am new user of this library. I am able to show the data and now I would like to show a tooltip while hovering the column header. I cannot find any documentation on this except for:
#1745
however this is only for the row cells and not the column header, even if I apply it to the header column like so:
<DataGrid
className='someName'
style = {{someStyle}}
rowGetter = {i => grid.rows[i]}
rowsCount={grid.rowsCount}
rows={grid.rows}
columns={getColumns(grid.columns)}>
function below, using the rc-tooltip library
const getColumns = (cols) => {
const colls= cols.map(c => ({...c, editor:TextEditor}))
//testing it on the first col
colls[0] = {
key: 'somekey',
name: 'somename',
editor: colls[0].editor,
formatter(props) => {
return <div>
<Tooltip destryOnhide={true} overlay={<span>message</span}> <a>{props.row.value}</a> </Tooltip>
</div>
}
}
}
the above shows the tooltip on the first row (not the column header) even if im adding the formatter to the actual column. Using 7.0.0.0-canary.48
2nd question , is there a way to add onclick or onhover (or any listener ) to the column header? thanks.
Beta Was this translation helpful? Give feedback.
All reactions