Closed vladoyoung closed 5 months ago
Hey, thanks for reporting this. This is an expected behavior since Tooltips rely on the focus event as well for the keyboard navigation and View is rendered as a div
which won't receive focus. What you can do is wrap it with Actionable
utility and pass the attributes to it instead of passing them to View
Ah, I wasn't aware of that, sorry!
I also tried adding the as
attribute like so: <View as="button"...>
. That works too, but created the default browser buttons style, so that's not ideal either:
I'll stick with your solution. Thanks for the quick reply!
You can close the issue if you think there's nothing to add.
Describe the bug Assigning the attributes of a to a components within throws the following TS error:
TS2322: Type TriggerAttributes is not assignable to type Attributes<"div", void>
To Reproduce Create an isolated reproduction on the CodeSandox: https://codesandbox.io/p/sandbox/distracted-david-smh2mr
Expected behavior There should be no TS error.
Screenshots
Environment (please complete the following information):
Additional context For this specific project configuration, putting in the following comments before the line with the error is the temporary solution:
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore