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] row has rowspan when hover it only has background on the first row of this rowspan #15529
Conversation
table row has rowspan when hover it only has background on the first row of this colspan
👋 @dowinweb, seems like this is your first time contribution to element-plus.
|
fixed [Style] [table] el-table表合并之后,鼠标移动上去样式错误 #15384 |
@btea 大佬麻烦帮看下 项目table hover时候有问题 急需修复下 |
🧪 Playground Preview: https://element-plus.run/?pr=15529 |
cc @element-plus/backers |
cc @kooriookami |
感谢你的贡献,我认为鼠标悬浮在合并的单元格的时候,应该将合并的单元格所在的行都填充背景色,这样更符合直觉一些。 Thank you for your contribution, I think when hovering over merged cells, it is more intuitive to fill the rows of merged cells with background color. |
fixed when hover on a rowspan > 1 cell give the whole rows background
You are right. I have fixed this. |
@FrontEndDog At first i finish this by writing code in the watch hoverRow method, but when you move your mouse from the first row of the merged cell rows, to the merged cell who has rowSan > 1, it didnot trigger the watch method, because the hoverRow didnot change. so i have to do this in the cell event listeners. |
@FrontEndDog bro, can this be merged ? any more suggestions? |
fixed hover on merged cell give the background of the whole rows
import addClass removeClass
@btea anything else need to fix |
add test case for hover on rowspan > 2
OK already added test case |
tell me if there is anything else to change @btea @FrontEndDog |
use getTestData is better
use getTestData instead
change templete label prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
@btea can this be merged? 😃 need to fix any other things?🤨 |
drop comments and clear hoveredCell array after use
当表格包含固定列同时 rowspan>2 时,样式会出错 鼠标在非 ID 的列上下移动 BUG |
when there is fixed row, hover on rowSpan > 1 should not clear the class
不得不说行固定的时候 执行的有点奇怪,我去标记了固定时候的行,以避免被清空行样式,我觉得修复好了 可以测试下 @tolking see if there is other conditions and boundary situations to test |
@tolking what do i need to do now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank for your contribution
table row has rowspan when hover it only has background on the first row of this rowspan
the other rows of which share the rowspan should also give the background of this cell when hover the other rows
Please make sure these boxes are checked before submitting your PR, thank you!
fix #15384
dev
branch.