Skip to content

Commit

Permalink
fix(tooltip): fix issue where tooltip trigger directive name defaults…
Browse files Browse the repository at this point in the history
… to string input
  • Loading branch information
goetzrobin committed Dec 20, 2023
1 parent fff3d3c commit 16d403f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libs/ui/tooltip/helm/src/lib/hlm-tooltip-trigger.directive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Directive, inject } from '@angular/core';
import { Directive, inject, Input, TemplateRef } from '@angular/core';
import { BrnTooltipTriggerDirective } from '@spartan-ng/ui-tooltip-brain';

@Directive({
Expand All @@ -8,7 +8,6 @@ import { BrnTooltipTriggerDirective } from '@spartan-ng/ui-tooltip-brain';
{
directive: BrnTooltipTriggerDirective,
inputs: [
'brnTooltipTrigger: hlmTooltipTrigger',
'brnTooltipDisabled: hlmTooltipDisabled',
'aria-describedby',
'position',
Expand Down Expand Up @@ -39,4 +38,10 @@ export class HlmTooltipTriggerDirective {
'data-[side=after]:slide-in-from-left-2 data-[side=before]:slide-in-from-right-2 ';
}
}

@Input()
set hlmTooltipTrigger(value: TemplateRef<unknown> | null | string) {
if (typeof value === 'string') return;
this._brnTooltipTrigger.content = value;
}
}

0 comments on commit 16d403f

Please sign in to comment.