at-ui
at-ui copied to clipboard
<at-table...>, Insert 'Edit' link, filter table
Hi there
I just started to check out AT-UI and I like it very much so far! I just got two things I'm missing from the documentation:
- Is there any way to display links inside a table? I got an array of JSON objects that make up the table data. I would like to add a column "Edit" for each entry that will route to an edit component when clicked. I didn't find that possibilty so far?
- Is there any way to have filters for each column of a table?
Best regards
-
Custom Column Template use
render
function https://vuejs.org/v2/guide/render-function.html -
sorry, the current version does not support this feature :(
title: 'Action',
render (h) {
return (<a href="/flights/topAirlines/edit/XXXXX"><i class='icon icon-edit-1'></i></a>)
}
The following code perfectly fine for me... @koppthe, can you help me displaying dynamic value at the place of XXXXX
render: (h, params) => {
The params object contains the information about the row, you can use that to insert something in the url. Hope this helps.
wouldnt it be more elegant to provide some kind of dynamic slot (via column key) to override the default cell template with?
<at-table :columns="columns1" :data="data1" stripe>
<template name="columnkey">
<h1>{{ column.value }}</h1>
</template>
</at-table>
https://vuejs.org/v2/guide/components-slots.html#Scoped-Slots