CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

Tooltip no visible if tree is not expanded #858

Closed lesianocmn closed 4 years ago

lesianocmn commented 4 years ago

Hello,

I'm trying to add a tooltip per node and the problem I see is that I can't make it always visible. If the tree is expanded the tooltip is shown, but if it's not or it's in the last node the tooltip is not shown. This is the code:

<tree-root #treeWrite [nodes]="nodesWrite" [options]="optionsWrite"  >
            <ng-template #treeNodeTemplate let-node let-index="index">
              <span class="textNode">{{ node.data.name }}</span>
              <div class='tooltip'>
                <img class='image' src='./assets/Images/timestamp.png' />
                <div class='tooltiptext'>
                  <p>{{getTimestamp(node.data)}}</p>
                </div>
              </div>
            </ng-template>
</tree-root>

This is how it's look like:

image

How to make it visible? z-index it's already high but still not visible.

Thanks for any help.

tobiasengelhardt commented 4 years ago

Is the tooltip below the cursor? It could be that the tooltip is there but hidden because it's outside the element. Can you inspect this to see if tooltip is there - but not in a visible place? Maybe there is no overflow allowed. Or you need to append the tooltip to another element.

lesianocmn commented 4 years ago

Hi @tobiasengelhardt . Yes the tooltip is there. I could fix it making the position fixed. Thanks for your help.