Skip to content

Commit e39e34e

Browse files
committed
Cell template README
1 parent 6e443d8 commit e39e34e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,26 @@ data () {
6565
| @click | |
6666
| @sort | |
6767
68-
### Item template
68+
### Cell template
6969
70+
Cell template is used to get access to list data as well as to indexing/sorting params generated by plugin.
7071
72+
Template's scope contains:
7173
74+
`props.item` - list item value
75+
`props.index` - initial index of the item
76+
`props.sort` - current index of an item after sorting
77+
`props.remove()` - method that will remove item from the arrey and resport list.
78+
79+
Example:
80+
81+
```
82+
<template slot="cell" scope="props">
83+
<div @click="() => { props.remove() }">
84+
<div>Data: {{props.item}}</div>
85+
<div>{{props.index}} / {{props.sort}}</div>
86+
</template>
87+
```
7288
7389
### Roadmap
7490

0 commit comments

Comments
 (0)