element icon indicating copy to clipboard operation
element copied to clipboard

[Feature Request] Allow users to access event object from 'expand' event of el-table.

Open Paul-Kijtapart opened this issue 9 years ago • 1 comments

Existing Component

Yes

Component Name

Element Table (el-table)

Description

Goal: I want to access event object of the expand event to perform stopPropagation().

What I have on the table: I registered two event 'row-click' and 'expand' on the element 'el-table'. When a user clicks the expand icon, expandHandler will be triggered following by rowClickHandler, which is to be expected. However, I want to trigger expandHandler only

What I tried: I tried to '@expand.stop.prevent' on the table element, which results in $event not having stopPropgation(). I tried passing $event object to expandHandler to manually call 'event.stopPropagation()', but $event ends up being rowObject. I also tried '@expand.native.stop', which results in expandHandler not being called at all.

Help: Is there a workaround for this?

Any help is appreciated.

Paul-Kijtapart avatar Oct 26 '17 18:10 Paul-Kijtapart

A flag could help: https://jsfiddle.net/jo2qve84/

Leopoldthecoder avatar Oct 27 '17 08:10 Leopoldthecoder