Skip to content

ATable component cannot set customRow to trigger row click #2903

@miyukoarc

Description

@miyukoarc
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.10

Environment

"ant-design-vue": "^2.0.0-beta.10","vue": "^3.0.0-rc.1",

Reproduction link

https://2x.antdv.com/components/table-cn/#Table-

Steps to reproduce

<template>
  <ATable :data-source="state.list" rowKey="id" :customRow="customRow">
  <ATableColumn key="date" title="date" data-index="date" />
</ATable>
</template>

<script>
import { reactive } from 'vue'
export default {
name: 'CustomExample',
setup() {
const state = reactive({
list: [
{
id: 1,
date: '第一天',
},
{
id: 2,
date: '第二天',
},
],
})

function customRow(record, index) {
return {
on: {
click: (e) => {
console.log(e, record, index)
},
},
}
}

return {
state,
customRow,
}
}
}
</script>

What is expected?

It can set customRow to trigger row click event

What is actually happening?

cannot trigger row click event

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions