@@ -53,19 +53,19 @@ export default {
53
53
/**
54
54
* @param {{
55
55
* dsData: Record<string, any>[];
56
- * dsFilterFields: { [fieldId in string]: (cellValue : any) => boolean | any };
56
+ * dsFilterFields: { [fieldId in string]: (columnValue : any) => boolean | any };
57
57
* dsSortby: string[];
58
58
* dsSearchIn: string[];
59
- * dsSearchAs: { [id in string]: (cellValue : any, searchString: string) => boolean };
60
- * dsSortAs: { [id in string]: (cellValue : any) => any };
59
+ * dsSearchAs: { [id in string]: (columnValue : any, searchString: string) => boolean };
60
+ * dsSortAs: { [id in string]: (columnValue : any) => any };
61
61
* }} props
62
62
*/
63
63
setup (props ) {
64
64
const dsPage = ref (1 )
65
65
const dsSearch = ref (' ' )
66
66
const dsShowEntries = ref (10 )
67
67
const datasetI18n = ref (i18n)
68
- const indexes = ref ([])
68
+ const dsIndexes = ref ([])
69
69
70
70
const search = (value ) => {
71
71
dsSearch .value = value
@@ -98,15 +98,15 @@ export default {
98
98
})
99
99
100
100
const dsRows = computed (() => {
101
- return indexes .value .slice (dsFrom .value , dsTo .value )
101
+ return dsIndexes .value .slice (dsFrom .value , dsTo .value )
102
102
})
103
103
104
104
const dsPages = computed (() => {
105
105
return createPagingRange (dsPagecount .value , dsPage .value )
106
106
})
107
107
108
108
const dsResultsNumber = computed (() => {
109
- return indexes .value .length
109
+ return dsIndexes .value .length
110
110
})
111
111
112
112
const dsPagecount = computed (() => {
@@ -156,13 +156,14 @@ export default {
156
156
// We need only the indexes
157
157
result = result .map ((entry ) => entry .index )
158
158
}
159
- indexes .value = result
159
+ dsIndexes .value = result
160
160
},
161
161
{
162
162
immediate: true
163
163
}
164
164
)
165
165
166
+ provide (' dsIndexes' , dsIndexes)
166
167
provide (' search' , search)
167
168
provide (' showEntries' , showEntries)
168
169
provide (' setActive' , setActive)
@@ -180,7 +181,7 @@ export default {
180
181
provide (' dsPage' , dsPage)
181
182
182
183
return {
183
- dsIndexes: indexes ,
184
+ dsIndexes,
184
185
dsShowEntries,
185
186
dsResultsNumber,
186
187
dsPage,
0 commit comments