Git Product home page Git Product logo

Comments (4)

zombieJ avatar zombieJ commented on July 22, 2024

嗯,demo 可以改进一下。

from ant-design.

github-actions avatar github-actions commented on July 22, 2024

Hello @zystudios. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @zystudios,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

from ant-design.

zystudios avatar zystudios commented on July 22, 2024

有几个临时解决方案
1 阻止事件冒泡,这个没问题,但是Tooltip本身是不支持事件绑定的,无法直接给Tooltips设置 onMouseDown,只能针对内部元素做绑定,不是很完美,比如极端情况,鼠标点击那个小箭头还是会触发,内部元素覆盖不到
2 改变显示方式,鼠标一旦离开select,tooltip就消失,这个也可以,因为根本没给他点击的机会(我暂时用这种)

但是完美情况还是点击的时候不触发,建议给Tooltip增加事件绑定,这样开发者可以自由决定

<Tooltips
onClick = ...
onMouseDown=...

from ant-design.

wanpan11 avatar wanpan11 commented on July 22, 2024

有几个临时解决方案 1 阻止事件冒泡,这个没问题,但是Tooltip本身是不支持事件绑定的,无法直接给Tooltips设置

这样可以,onMouseDown 事件对 Tooltips 组件没有实际的作用 感觉加不加都行

          <div onMouseDown={(evt) => evt.stopPropagation()}>
            <Tooltip title={omittedValues.map(({ label }) => label).join(', ')}>
              <span>Hover Me</span>
            </Tooltip>
          </div>

from ant-design.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.