-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to add tooltip to Header item #1263
Comments
I thought there was a parameter to do this, but haven't come across it again in the docs. I did a very bulky, pure CSS implementation as:
And then CSS from here: https://www.w3schools.com/css/css_tooltip.asp I'm looking to find a better way to do this. |
Column import { Tooltip, TableCell } from '@material-ui/core';
const createHeaderWithTooltip = (title: string, tooltip: string) => {
return (
<Tooltip title={tooltip} placement='top'>
<TableCell>{title}</TableCell>
</Tooltip>
);
};
const [columns, setColumns] = React.useState<Array<Column<Data>>>([
{ title: createHeaderWithTooltip('Name', 'Name of the data'), field: 'name' },
]); |
Setting |
Hi @jakeleventhal , I will take a look again. |
Also, there should be some sort of indication that the header has a tooltip. Right now, it is not clear until it appears |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
not stale @mbrn |
Problem solved with 1.68.1 |
hi const [columns, setColumns] = useState<any[]>([ |
Is it currently possible to add a tooltip to items in the header? If it isn't possible I was considering injecting a tooltip by locating the item from an id for the item, but I also don't see a way to add a specific id to the element.
Thanks
The text was updated successfully, but these errors were encountered: