akveo / akveo/react-native-ui-kitten

On web, how can I make the Tooltip component work on hover?

未关闭
#1,186 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
10.7k
派生
962
PR 合并指标
30 天内没有已合并 PR

描述

## 💬 Question

Hi there, thanks for making UI Kitten, I'm enjoying using it.

I'm working on a project that's on web as well as on mobile, and we're using the Tooltip component in a few places. This works fine when you click on it, but on web we'd like for the tooltip to appear when you hover over it as well.

I can add onMouseEnter and onMouseLeave props to my anchor, but the problem is that if I make onMouseEnter display the tooltip, the onMouseLeave callback is called immediately because once the tooltip is rendered, the mouse is now over the popover's full-screen backdrop which seems intended to detect clicks outside of the popover. As a result, it disappears immediately.

Here is an example of what I'm talking about: https://snack.expo.io/zfeROwDOi

Do you have any suggestions as to how this could be achieved?

## UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | 2.0.0 |
| @ui-kitten/components | 5.0.0 |

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。