'Ag-grid tooltip above ellipsis text only
I'm using the enterprise ag-Grid version in my project.
I found tooltip supporting under the box and make as follows:
columnDefs = [
{
headerName: 'USER NAME',
field: 'userName',
sortingOrder: ['asc', 'desc'],
filter: 'agTextColumnFilter',
filterParams: {newRowsAction: "keep"},
floatingFilterComponentParams: {suppressFilterButton: true},
suppressMenu: true,
tooltip: (t: any) => { return t.value; }
}, //...
];
Tooltip works fine and shows above every cell of the 'userName' column in my grid.
Is it possible to show tooltip above headers/cells if a text is ellipsis only?
Thanks in advance.
Solution 1:[1]
In case of someone is checking this question, maybe a solution could be use this one to detect if ellipsis is showing.
Then do something like this:
if (ellipsisIsShowing())
return t.value;
else
return; //no tooltip will be shown
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
