-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Create tippy Programmatically #102
Comments
why is this ignored? I've always had an issue creating tippy programatically |
@rmpt were you able to solve the issue? |
@shaharkazaz thanks for your reply. The issue was that I did not import the TippyModule in the AppModule, but rather into a sub module, the general config was not set to the data i provided inside .forRoot(). I fixed the issue by importing the TippyModule inside AppModule. |
I'm submitting an issue
Current behavior
The example have a variable conflict, both TippyService and TippyInstance have the same variable name. That's issue one.
After fixing this, when I call:
const myTippyInstance = this.tippyService.create(element, 'this field is required', { arrow: true });
I can't call
myTippyInstance.open()
because:Property 'open' does not exist on type 'ExtendedTippyInstance<"this field is required">'.
I've cast the result of create to
any
but still get the error on the console, but the tooltip shows correctly. What should I do to avoid this crash?Expected behavior
create
function should return a type that allows to callopen
method right away. Apart of that, the crash is weird in the sense that the tooltip shows, so no error should be shown.Minimal reproduction of the problem with instructions
Simple angular 13 app applying the simplest example, the one on your github page.
What is the motivation / use case for changing the behavior?
Tooltip over calendar events.
Environment
The text was updated successfully, but these errors were encountered: