This is the code snippet for the table which I am trying to render, have imported a-table
from antd
. Currently, we can add an extra td
to achieve click functionality to route to details page from this listing page
<a-table
:columns="companiesColumns"
:dataSource="getDisplayData"
class="companies-table"
:pagination="false"
rowKey="id"
>
<span slot="nse_symbol" slot-scope="nse_symbol" class="nse-symbol">
<span>{{ nse_symbol || '-' }}</span>
</span>
</a-table>
Without using the jsx plugin:
Modified code from Matt Sanders
<a-table :dataSource="dataSource" :columns="columns" rowKey="id" :customRow="customRow">
const customRow = (record) => {
return {
onClick: (event) => {console.log('click row', record);}
};
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With