0

When the cell width is less than the width required for content, on hovering tooltip is used to show the trimmed value. But once I hovered over the cell, it will show the current value but in background its changing frequently while that change is not coming in tooltip.

For this I am using Grid options. enableAutoTooltip: true,

Screenshot attached showing the previous value only 0.8999.. while current value is 0.28000...

showing tooltip mismatch

Any lead how can i update the tooltip with the latest value?

For updating the cell i am using updateItem of grid service provided by slickgrid.

Version used: Angular:8.2 Angular-slickgrid: 2.18.6

Thanks in advance.

1 Answers1

1

It's quite simple, just create your own Custom Formatter that will always include the title attribute and that's it

const myFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any, grid?: any) =>
  value ? `<span title="${value}">${value}</span>` : '';

If your question is about updating the data in the grid, then you will need to let the grid know about the change. There's no magic, you need to update the grid whenever your data changes (it won't update by itself) via the DataView and/or the Grid Service with updateItem, you can refer to Example 11 and click on the button "Update 2nd row with random Duration"

ghiscoding
  • 12,308
  • 6
  • 69
  • 112