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

TooltipTriggerDirective: change inputs for models #3281

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ptit-Biscuit
Copy link

Description

Change inputs for models to set properties from outside.


Th goal is to be able to set luTooltip, luTooltipDisabled etc directly within a .ts file. E.g. on T.Abs we have a translateI18n directive that adds a tooltip on host so we want to set it within ngOnInit.


@Ptit-Biscuit Ptit-Biscuit requested a review from Supamiu December 11, 2024 08:50
@Ptit-Biscuit Ptit-Biscuit added the 🔖✨ Feature New feature (even a very small one) label Dec 11, 2024
@LuccaIntegration
Copy link

@Supamiu
Copy link
Contributor

Supamiu commented Dec 11, 2024

@GuillaumeNury I was thinking about this yesertday and I thought: what about using linkedSignals for input overrides?

Something like:

luTooltip = input<PortalContent>();

tooltipContent = linkedSignal(() => this.luTooltip());

This would allow overriding the value from any component using this as hostDirective without using a model, additionally, with a proper naming convention, we could make it easy to use for most devs.

However, it wouldn't fix the issue with required imports, but that's on Angular.

@GuillaumeNury
Copy link
Contributor

I like the idea of linkedSIgnal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖✨ Feature New feature (even a very small one)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants