Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip in cell #435

Open
mb0hn opened this issue Mar 6, 2023 · 0 comments
Open

Tooltip in cell #435

mb0hn opened this issue Mar 6, 2023 · 0 comments

Comments

@mb0hn
Copy link

mb0hn commented Mar 6, 2023

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

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

No branches or pull requests

1 participant