Dash table with conditional tooltips with function as value

Is it possible to pass cell values to a function that returns the value for a conditional tooltip in Dash.table.
Something like:

def get_img(col_value):
    return Image(col_value)


dash_table.DataTable(
    ...
    tooltip_conditional = [{
        'if': {'column_id': 'COLUMN_NAME'},
        'value': get_img({'COLUMN_NAME'})
    }],
)

In my application, I have a table where each row is an individual molecule. One column contains string information about the molecule’s structure. I have a function get_img that returns the molecule structure as an image, when supplied with the string information from the table.

Hi @luggie, did you try adapting this example?

Yes but this does not answer my question.

Consider the following example:
I have a table with some columns. One of which is called img_information
When hovering over a cell in this column, I’d need the information in this cell to be passed to a function, that returns an image. This image should be drawn inside the tooltip.

Repost of my code example, a bit more precise:

def get_img(hovered_cell_value):
    return make_image(hovered_cell_value)


dash_table.DataTable(
    ...
    tooltip_conditional = [{
        'if': {'column_id': 'img_information'},
        'value': get_img(SOMEHOW_MAGICALLY_GET_HOVERED_CELL_VALUE)
    }],
)