Skip to content

Commit

Permalink
dont put max width when using own template
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter-willems committed Jul 19, 2024
1 parent 725f219 commit 1760675
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions projects/demo/src/app/demo/demo.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@
I am a small piece of text
</klp-form-button>

<klp-form-button klpWithTooltip="black" [tooltipTemplate]="tooltipTpl">
<klp-form-button klpWithTooltip="black" [tooltipTemplate]="tooltipTpl" style="margin-left: 300px">
Tooltip with template
<ng-template #tooltipTpl>
<div style="color: white; backgroundColor: #123456;">kers</div>
<div style="color: white; backgroundColor: #123456;">
<div>A very looooong piece of text. A very looooong piece of text. A very looooong piece of text</div>
<div>That's nice</div>
</div>
</ng-template>
</klp-form-button>

Expand Down
2 changes: 1 addition & 1 deletion projects/klippa/ngx-enhancy-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@klippa/ngx-enhancy-forms",
"version": "14.22.0",
"version": "14.22.1",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class WithTooltipDirective implements OnChanges{
if (stringIsSetAndFilled(textToDisplay)) {
this.div.textContent = textToDisplay;
} else if (this.templateInstance) {
this.div.style.maxWidth = 'none';
this.div.style.visibility = 'hidden';
this.div.appendChild(this.templateInstance);
setTimeout(() => {
Expand Down

0 comments on commit 1760675

Please sign in to comment.