简体   繁体   English

在工具提示内滚动 在反应中滚动整个页面 @material-ui/core/Tooltip

[英]scroll inside the tooltip scrolls the entire page in react @material-ui/core/Tooltip

I have a tooltip created using @material-ui/core/Tooltip https://codesandbox.io/s/kgccc which work fine as shown below我有一个使用@material-ui/core/Tooltip https://codesandbox.io/s/kgccc创建的工具提示,如下所示

在此处输入图像描述

since the content is more, have provide scroll由于内容较多,有提供滚动

 .tooltip-popup-details{
    height: 300px;
    overflow: auto;
  }

when tried to scroll the tool tip by clicking inside the content entire page scroll tried alot to fix it but could not make it basically drag or scroll inside tool tip is not working please help当试图通过单击内容内部来滚动工具提示时,整个页面滚动尝试了很多修复它但无法使其基本上拖动或滚动工具提示内部不起作用请帮助

I've taken the Material UI example and made a fork with a tooltip that has a fixed height and a scrollbar like yours.我采用了 Material UI 示例,并制作了一个带有固定高度和滚动条的工具提示的叉子,就像你的那样。 Here it is .在这里 I can scroll inside the tooltip with my touchpad, and with the scrollbar of the tooltip.我可以使用触摸板和工具提示的滚动条在工具提示内滚动。

I have added interactive={true} on the tooltip, otherwise the tooktip disappears when moving the mouse out of the button that triggers it.我在工具提示上添加了interactive={true} ,否则当将鼠标移出触发它的按钮时,提示会消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM