-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(components): [table] tooltipOptions.showAfter is not effective #13175
Conversation
tooltipOptions.showAfter is not effective
tooltipOptions.showAfter is not effective
👋 @xingyixiang, seems like this is your first time contribution to element-plus.
|
Hello @xingyixiang, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
Seems to be the same as #12578 |
🧪 Playground Preview: https://element-plus.run/?pr=13175 |
@btea No one review the code |
I'll take a look when I can afford it~ |
还是无效啊? |
@PeiJM 代码没合入,没人review |
@btea When can the code be incorporated? |
Thank you for your contribution. It looks good, let's merge it now. |
@btea Sorry, there is something wrong with this mr. After tooltipOptions.showAfter is set, the popper will be closed when the mouse is moved to the popper and then to the table cell. You can roll back this mr. I'll study how to modify it. |
@btea 之前因为showAfter不生效,所以鼠标进入popper后,重新进入table的cell,会触发销毁removePopper。并重新走createTablePopper流程,此方法会立刻创建出一个新的popper并立刻展示,所以实际效果是再次移入table的cell不会关闭popper。现在showAfter生效,就需要一段时间才能重新展示。导致出现这个现象 |
Indeed, the reason is exactly as you said. Maybe we can add a flag, if showAfter is set, we can delay the popper from closing, and then close it if the creation is not triggered again in a short period of time. |
…lement-plus#13175) * fix(components): [table] tooltipOptions.showAfter is not effective * fix(components): [table] tooltipOptions.showAfter is not effective --------- Co-authored-by: btea <2356281422@qq.com>
element-plus#14735) Revert "fix(components): [table] tooltipOptions.showAfter is not effective (element-plus#13175)" This reverts commit 6238ec8.
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
🤖 Generated by Copilot at bd69775
Add
showAfter
option for table tooltip and improve popper logic inutil.ts
. This allows users to customize the tooltip delay and fixes some bugs with the popper positioning and visibility.Related Issue
Fixes #12564, #14678.
Explanation of Changes
🤖 Generated by Copilot at bd69775
showAfter
option for table tooltip to delay popper appearance (link, link, link, link)togglePopperVisible
function to modify popper display style based on parameter (link)onOpen
andonClose
handlers assignment fromuseDelayedToggle
hook (link)showAfter
is enabled (link)onOpen
at the end ofcreateTablePopper
function to create and update popper instance and start delay timer (link)