Skip to main content

How to Add Parameters to Click Events

Background:

Method 1

image.png

Following the Fusion ProTable pattern, couple the action column directly with a Button component. Because the col.render function receives row data (record), the ProTable wrapper can pass col.render arguments through to the Button when rendering action column buttons.

Method 2

Slot + extended parameters

image.png

Set extended parameters to:

{
record: this.record,
index: this.index
}

Then the event handler receives them as the second argument:

onClick_new_new(...args){
console.log(args)
}