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

Passing inputs to tippyService when dynamically instantiating a component ? #154

Open
vzakharov-rxnt opened this issue Mar 20, 2024 · 0 comments

Comments

@vzakharov-rxnt
Copy link

vzakharov-rxnt commented Mar 20, 2024

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

I don't know how to pass inputs with tippyService, it's not specified in the docs, nor it is evident from implementation.

Expected behavior

It should be possible to pass some input to components created using TippyService.

Minimal reproduction of the problem with instructions

I am using it with fullcalendar / eventDidMount. It creates the component without inputs no problem. Problem is when I want to pass inputs to it.

This has no effect:

eventDidMount: info => {
  this.tippyService.create(info.el, TooltipContainerComponent, {
    data: 'data',
    context: 'context'
  });
}

// component is defined like this
export class TooltipContainerComponent {
  @Input() data: string = '';
  @Input() context: string = '';
}

// template
<p>tooltip-container works! {{ data }} {{ context }}</p>

What is the motivation / use case for changing the behavior?

Passing components as content is a lot less useful without inputs.

Environment


Angular version: 17


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 18
- Platform: Windows
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