Skip to content

Tooltip in cell #435

@mb0hn

Description

@mb0hn

Hello!

I'm looking for a solution to enable tooltips in cells. I tried several tips, without success. Until I tried to change it to text.
I did the following in thead:

<th data-header-css-class="col-2" data-column-id="company" data-formatter="company" data-type="text">Company</th>
and then in the formatters

                  formatters: {
                     "company": function(column, row)
                      {
                         return "<td class=\"text-left\" data-toggle=\"tooltip\" title=\""+ row.company +"\"> "+ row.company +" </td>";
                      },

It worked, but with side effects. It offsets an empty column and then fills (in the wrong column) the data, containing the tooltips.

Example of operation WITHOUT my changes:

<td class="text-left" style="">5</td>
<td class="text-left" style="">TEST</td>
<td class="text-left" style="">TEST2</td>
<td class="text-left" style="">TEST3</td>

Example with my changes, applied to the second column:

<td class="text-left" style="">5</td>
<td class="text-left" style=""></td>
<td class="text-left" data-toggle="tooltip" title="TEST">TEST</td>
<td class="text-left" style="">TEST2</td>

Detail: the tooltip works, it displays the title with the value TEST, but as we can see, the empty column is present. Any tips? Or is there another way to include tooltip in a cell in Bootgrid?

Grateful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions