11<template >
22 <v-data-table
3- @click:row =" selectActivity($event.id)"
43 :headers =" headers"
54 :items =" items"
65 height =" 100%"
76 item-class =" class"
87 disable-pagination hide-default-footer fixed-header
98 class =" overview primary lighten-5" >
10- <template #item .name =" { item , value } " >
11- <div class =" d-flex" >
12- <overview-name :value =" value" />
13- <publishing-badge v-if =" isAdmin || isRepositoryAdmin" :activity =" item" />
14- </div >
15- </template >
16- <template #item .status =" { value } " >
17- <overview-status v-bind =" value" />
18- </template >
19- <template #item .assignee =" { value } " >
20- <overview-assignee v-bind =" value" />
21- </template >
22- <template #item .priority =" { value } " >
23- <overview-priority v-bind =" value" />
24- </template >
25- <template #item .dueDate =" { value } " >
26- <overview-due-date v-if =" value" :value =" value" />
9+ <template v-slot :item =" { item } " >
10+ <v-lazy
11+ v-model =" itemVisibility[item.id]"
12+ @click =" selectActivity(item.id)"
13+ :class =" { selected: isActivitySelected(item.id) }"
14+ tag =" tr"
15+ style =" height : 48px ;" >
16+ <div style =" display : contents ;" >
17+ <td class =" text-left" >
18+ <v-col class =" d-flex text-left" >
19+ <overview-name :value =" item.name" />
20+ <publishing-badge v-if =" isAdmin || isRepositoryAdmin" :activity =" item" />
21+ </v-col >
22+ </td >
23+ <td class =" text-left" >
24+ <overview-status v-bind =" item.status" />
25+ </td >
26+ <td class =" text-left" >
27+ <overview-assignee v-bind =" item.assignee" />
28+ </td >
29+ <td class =" text-left" >
30+ <overview-priority v-bind =" item.priority" />
31+ </td >
32+ <td class =" text-left" >
33+ <overview-due-date v-if =" item.dueDate" :value =" item.dueDate" />
34+ </td >
35+ </div >
36+ </v-lazy >
2737 </template >
2838 </v-data-table >
2939</template >
@@ -45,6 +55,9 @@ export default {
4555 props: {
4656 activities: { type: Array , default : () => [] }
4757 },
58+ data : () => ({
59+ itemVisibility: {}
60+ }),
4861 computed: {
4962 ... mapGetters ([' isAdmin' ]),
5063 ... mapGetters (' repository' , [' isRepositoryAdmin' , ' workflow' ]),
@@ -116,12 +129,13 @@ export default {
116129 </script >
117130
118131<style lang="scss" scoped>
119- $row-background : var (--v-primary-lighten4 );
132+ $row-background : var (--v-primary-lighten5 );
133+ $row-hover-background : var (--v-primary-lighten4 );
120134
121135.overview ::v-deep {
122136 thead .v-data-table-header {
123137 tr th {
124- background : #eceff1 ;
138+ background : $row-hover-background ;
125139 }
126140 }
127141
@@ -133,16 +147,25 @@ $row-background: var(--v-primary-lighten4);
133147 max-width : 11.5rem ;
134148 }
135149
136- tr :hover {
137- background : $row-background !important ;
150+ .v-lazy {
151+ background-color : $row-background ;
152+ border-bottom : thin solid rgba (0 , 0 , 0 , 0.12 );
153+
154+ & :hover {
155+ background-color : $row-hover-background !important ;
156+ }
157+
158+ & .selected {
159+ background : $row-hover-background !important ;
160+ }
138161
139162 & :not (.selected ) {
140163 cursor : pointer ;
141164 }
142- }
143165
144- .selected {
145- background : $row-background ;
166+ td {
167+ height : 48px ;
168+ }
146169 }
147170}
148171 </style >
0 commit comments