Skip to content

[Bug Report] The location of the Table filter-panel is incorrect #6159

@wind928

Description

@wind928

Element UI version

1.4.1

OS/Browsers version

windows7 / all

Vue version

2.4.2

Reproduction Link

https://jsfiddle.net/41cc3ewk/

Steps to reproduce

jsfiddle中的例子仿照官网文档的例子,含有过滤属性的是“标签”那一列
1、等待页面加载好后,点击header的空白区域(而不是下箭头),filter-panel会出现在列的最右端,而不是箭头下方
2、刷新页面,点击过滤的下箭头,则filter-panel会出现在箭头下方

What is Expected?

无论是点击哪里,展开的filter-panel都应出现在箭头的下方

What is actually happening?

当页面刷新后,点击下箭头时,filter-panel出现的位置正确。
如果第一次点击是在header的空白区域时,则filter-panel的位置就会出现在列的最右边。

问题的原因在#3132中已经查明,原因是filter-panel的位置是根据第一次点击的event.target决定的,当点击header的空白区域时,实际传给filter-panel的target是header而不是filter箭头,因此filter-panel的位置会根据header的位置来设定

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions