Ant-design-vue: The Table component don't support rowClick event and receive params like column's data?

Created on 3 Jun 2019  ·  2Comments  ·  Source: vueComponent/ant-design-vue

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

About Table component, when i click row, i want to do sth with current column data;
I found 'customRow: onClick' event in document,but i can't get current column data on click event with params...

What does the proposed API look like?

The React antDesign UI frame(https://ice.work/component/table): Table -> onRowClick event

Most helpful comment

use customRow prop

<a-table :customRow="customRow"></a-table>
function customRow(record) {
      return {
        on: {
          click: event => {
            console.log(event, record);
          }
        }
      };
    }

All 2 comments

Perhaps you can use slots. Then add record to the slot-scope so you have access to the full record of the iteration.

use customRow prop

<a-table :customRow="customRow"></a-table>
function customRow(record) {
      return {
        on: {
          click: event => {
            console.log(event, record);
          }
        }
      };
    }
Was this page helpful?
0 / 5 - 0 ratings