@@ -39,7 +39,7 @@ const { downPage = false } = defineProps<{ downPage: boolean }>()
3939const chunksLoading = ref (false )
4040
4141const tableStyle = computed (() => ({
42- ' --participants-count' : ` ${pollStore . safeParticipants .length } ` ,
42+ ' --participants-count' : ` ${votesStore . getChunkedParticipants .length } ` ,
4343 ' --options-count' : ` ${optionsStore .options .length } ` ,
4444}))
4545
@@ -73,7 +73,7 @@ function isVotable(participant: User, option: Option) {
7373 class="vote-table"
7474 :style =" tableStyle " >
7575 <StickyDiv
76- v-if =" pollStore .viewMode === ' table-view' "
76+ v-show =" pollStore .viewMode === ' table-view' "
7777 key="grid-info"
7878 sticky-left
7979 class="grid-info">
@@ -90,7 +90,7 @@ function isVotable(participant: User, option: Option) {
9090 </StickyDiv >
9191
9292 <StickyDiv
93- v-if =" pollStore .viewMode === ' table-view' "
93+ v-show =" pollStore .viewMode === ' table-view' "
9494 :id =" ` option-item-spacer ` "
9595 class="option-item-spacer"
9696 sticky-top
@@ -100,19 +100,22 @@ function isVotable(participant: User, option: Option) {
100100
101101 <StickyDiv
102102 v-if =" pollStore .permissions .seeResults "
103+ v-show =" pollStore .viewMode === ' table-view' "
103104 sticky-left
104105 class="counter-spacer" />
105106
106107 <StickyDiv
107- v-for =" participant in pollStore . safeParticipants "
108+ v-for =" participant in votesStore . getChunkedParticipants "
108109 :key =" participant .id "
109110 class="participant"
110111 sticky-left>
111112 <VoteParticipant :user =" participant " />
112113 </StickyDiv >
113114
114115 <template v-for =" option in optionsStore .orderedOptions " :key =" option .id " >
115- <div v-if =" pollStore.viewMode === 'table-view'" class =" option-menu-grid" >
116+ <div
117+ v-show =" pollStore.viewMode === 'table-view'"
118+ class =" option-menu-grid" >
116119 <CalendarPeek
117120 v-if =" showCalendarPeek "
118121 :id =" ` peek-${option .id } ` "
@@ -131,7 +134,7 @@ function isVotable(participant: User, option: Option) {
131134 <StickyDiv
132135 :id =" ` option-item-${option .id } ` "
133136 class="option-item"
134- sticky-top
137+ : sticky-top = " pollStore . viewMode === ' table-view ' "
135138 :activate-bottom-shadow =" ! downPage " >
136139 <OptionItem :option =" option " />
137140 </StickyDiv >
@@ -144,7 +147,7 @@ function isVotable(participant: User, option: Option) {
144147 :option =" option " />
145148
146149 <div
147- v-for =" participant in pollStore.safeParticipants "
150+ v-for =" participant in votesStore.getChunkedParticipants "
148151 :key =" participant.id"
149152 class =" vote-cell"
150153 :class =" { 'current-user': isCurrentUser(participant) }" >
@@ -175,6 +178,7 @@ function isVotable(participant: User, option: Option) {
175178 grid-auto-rows : auto ;
176179 grid-auto-flow : column ;
177180 overflow : scroll ;
181+ margin : auto ;
178182
179183 .vote-cell {
180184 padding : 0.4rem ;
@@ -192,6 +196,11 @@ function isVotable(participant: User, option: Option) {
192196 visibility : hidden ;
193197 }
194198
199+ & .sticky-left {
200+ left : -8px ;
201+ padding-left : 8px ;
202+ }
203+
195204 & :hover {
196205 background : var (--color-background-hover );
197206
@@ -223,7 +232,6 @@ function isVotable(participant: User, option: Option) {
223232 overflow : visible ;
224233 min-width : min-content ;
225234 max-width : max-content ;
226- margin : auto ;
227235 .grid-info {
228236 grid-row : 1 ;
229237 grid-column : 1 ;
@@ -295,14 +303,15 @@ function isVotable(participant: User, option: Option) {
295303 }
296304
297305 & .list-view {
298- grid-template-columns : auto 5rem 5rem ;
306+ row-gap : 8px ;
307+ grid-template-columns :
308+ minmax (11rem , max-content )
309+ minmax (4rem , max-content )
310+ minmax (4rem , max-content );
299311 max-width : var (--cap-width );
312+ width : fit-content ;
300313
301- .grid-info ,
302- .option-spacer ,
303- .counter-spacer ,
304- .participant ,
305- .option-menu-grid {
314+ .participant {
306315 display : none ;
307316 }
308317
0 commit comments