Skip to content

Typescript and UI5 React #1564

Closed Answered by Lukas742
kbachl asked this question in Q&A
May 10, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hello @kbachl

to use the publicly exposed methods of components you need to type your ref with the corresponding interface. For popovers this is Ui5PopoverDomRef. You can find all available interfaces for the main package here and for charts here.

I also created a codesandbox which implements the behavior of your example.

If you have a lot of ts-errors, forcing you to use ts-ignore, please tell us where these errors are thrown and we will gladly try to find a solution and fix them. Without any reproducible examples there is unfortunately not much that we can do.

One last thing, with our latest release we improved the typings of event-handlers, maybe this will solve some ts-errors for you …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kbachl
Comment options

Answer selected by MarcusNotheis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants