Skip to content

Conversation

@pfalcon
Copy link

@pfalcon pfalcon commented Jan 1, 2026

Currently, the renderer can return a lot of properties related to cell. But if you think about it, 'title' (to be shown as a tooltip by browser) is just another such property. So, offloading title generation to another title callback doesn't have much sense, especially taking into account that rendered value and tooltip are oftentimes connected, so it's more efficient to generate them in one call, instead of making double work via two callback calls. Actually, it kind of possible to return title from renderer now, using divAttr property. But that kind of conflicts with existing recordTitles support, so requires ugly workarounds if both are desired.

So, this change gives well defined ordering, while retaining backward compatibility with existing title callback:

  1. If the render callback returns title property, it has priority, and will be used regardless of recordTitles state. (Because if user defined custom render callback and returned title from it, then they want title to be rendered, period).
  2. Otherwise existing title handling will be used.

Currently, the renderer can return a lot of properties related to cell.
But if you think about it, 'title' (to be shown as a tooltip by browser)
is just another such property. So, offloading title generation to another
`title` callback doesn't have much sense, especially taking into account
that rendered value and tooltip are oftentimes connected, so it's more
efficient to generate them in one call, instead of making double work
via two callback calls. Actually, it kind of possible to return title
from renderer now, using divAttr property. But that kind of conflicts
with existing `recordTitles` support, so requires ugly workarounds if
both are desired.

So, this change gives well defined ordering, while retaining backward
compatibility with existing `title` callback:

1. If the `render` callback returns `title` property, it has priority,
and will be used regardless of `recordTitles` state. (Because if user
defined custom render callback and returned title from it, then they
want title to be rendered, period).
2. Otherwise existing title handling will be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant