Ag-grid: keep open tooltip for a certain predefined time
Asked Answered
S

0

5

I am using Ag-grid v23.1.1

I need to show a tooltip for 1 minute.

Ag grid does not support this case But earlier in version 22 I have used next lifehack

params.api.context.beanWrappers.tooltipManager.beanInstance.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT = 0;
params.api.context.beanWrappers.tooltipManager.beanInstance.DEFAULT_HIDE_TOOLTIP_TIMEOUT = 60000;
params.api.context.beanWrappers.tooltipManager.beanInstance.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT = 3000;

But in the current version (23) tooltipManager has been removed.

And we have TooltipFeature https://github.com/ag-grid/ag-grid/blob/master/community-modules/core/typings/widgets/tooltipFeature.d.ts

In new version names has been changed to:

 DEFAULT_HIDE_TOOLTIP_TIMEOUT;
    SHOW_QUICK_TOOLTIP_DIFF;
    FADE_OUT_TOOLTIP_TIMEOUT;

The same approach is not valid

Do you know any lifehacks in the current version?

Searchlight answered 27/5, 2020 at 15:56 Comment(1)
Instead of hacking the non-public internals of the grid, which inevitably leads to breakage on version changes, you might want to consider writing a custom CellRenderer that puts up a tooltip so that you can implement the tooltip the way that you want to.Calaboose

© 2022 - 2024 — McMap. All rights reserved.