Reputation: 41
How to change the position of the custom tooltip? Example: always show in the upper right corner of the table
Currently always show below the cursor: pic1
I want to display it in the upper right corner of the table: pic2
Code example from the Ag-grid official website:
https://www.ag-grid.com/javascript-grid-tooltip-component/#example-custom-tooltip
Thanks for the help!
Ag-grid version: 23
Upvotes: 1
Views: 6930
Reputation: 18879
There is a tooltip-component
where the styles are automatically added by Ag-Grid.
Try adding the following CSS:
.ag-tooltip-custom {
top: 5px !important;
right: 14px !important;
left: auto !important;
}
!important
is important because we need to override the style
given to the tooltip-component
.
In the picture I have added to .ag-popup-child
but you should add it to .ag-tooltip-custom
. You can also play around with the numbers.
Upvotes: 2