@@ -90,6 +90,7 @@ const props = defineProps({
90
90
91
91
92
92
const classes = inject (' classes' );
93
+ const colorsProp = ref (props .colors );
93
94
const tableSettings = ref ({ ... props .settings , ... props .colors });
94
95
95
96
const headers = {
@@ -110,8 +111,9 @@ const headers = {
110
111
{
111
112
align: ' start' ,
112
113
key: ' id' ,
114
+ sortable: false ,
113
115
title: ' Comment ID' ,
114
- width: 150 ,
116
+ width: 130 ,
115
117
},
116
118
{
117
119
align: ' start' ,
@@ -135,7 +137,7 @@ const headers = {
135
137
align: ' start' ,
136
138
key: ' id' ,
137
139
title: ' Post ID' ,
138
- width: 260 ,
140
+ width: 240 ,
139
141
},
140
142
{
141
143
align: ' start' ,
@@ -148,20 +150,30 @@ const headers = {
148
150
},
149
151
],
150
152
users: [
153
+ // {
154
+ // key: 'data-table-select',
155
+ // title: '',
156
+ // },
151
157
{
152
158
align: ' start' ,
153
159
key: ' id' ,
154
160
title: ' User ID' ,
155
- width: 370 ,
161
+ width: 350 ,
156
162
},
157
163
{
158
164
align: ' start' ,
159
165
key: ' name' ,
166
+ renderer (value ) {
167
+ return value;
168
+ },
160
169
title: ' Name' ,
161
170
},
162
171
{
163
172
align: ' start' ,
164
173
key: ' email' ,
174
+ renderItem (value ) {
175
+ return ` <a href="mailto:${ value} ">${ value} </a>` ;
176
+ },
165
177
title: ' Email' ,
166
178
},
167
179
{
@@ -225,18 +237,22 @@ const footers = {
225
237
},
226
238
],
227
239
users: [
240
+ // {
241
+ // key: 'data-table-select',
242
+ // title: '',
243
+ // },
228
244
{
229
245
align: ' start' ,
230
246
key: ' id' ,
247
+ renderFooter () {
248
+ return ' ' ;
249
+ },
231
250
title: ' User ID' ,
232
251
width: 350 ,
233
252
},
234
253
{
235
254
align: ' start' ,
236
255
key: ' name' ,
237
- renderer () {
238
- return ' Total' ;
239
- },
240
256
title: ' Name' ,
241
257
},
242
258
{
@@ -287,7 +303,7 @@ function fetchClientData(drilldown = null) {
287
303
user .child = {};
288
304
user .child = {
289
305
... tableDefaults,
290
- colors : null ,
306
+ ... colorsProp . value ,
291
307
drilldownKey: ' id' ,
292
308
footers: footers .posts ,
293
309
headers: headers .posts ,
@@ -297,6 +313,7 @@ function fetchClientData(drilldown = null) {
297
313
};
298
314
}
299
315
316
+
300
317
// Comments Level 3 //
301
318
if (drilldown? .level === 2 ) {
302
319
userId = item .userId ;
@@ -314,11 +331,11 @@ function fetchClientData(drilldown = null) {
314
331
post .child = {};
315
332
post .child = {
316
333
... tableDefaults,
317
- colors : null ,
334
+ ... colorsProp . value ,
318
335
drilldownKey: ' id' ,
319
336
footers: footers .comments ,
320
337
headers: headers .comments ,
321
- itemsPerPage: 2 ,
338
+ itemsPerPage: tableSettings . value . itemsPerPage ,
322
339
level: 3 ,
323
340
loading: true ,
324
341
sortBy: [],
0 commit comments