Skip to content

Commit 0f02d43

Browse files
committed
feat: optimize member list (code review and more fixes)
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
1 parent 49b8848 commit 0f02d43

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/components/Member/MemberPicker.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ export default {
8787
},
8888
8989
props: {
90+
isLoading: {
91+
type: Boolean,
92+
default: false,
93+
},
94+
9095
searchWithoutQuery: {
9196
type: Boolean,
9297
default: false,
@@ -169,7 +174,7 @@ export default {
169174
},
170175
171176
showCurrentSkeleton() {
172-
return this.showCurrent && this.currentMembers.length === 0
177+
return this.showCurrent && (this.currentMembers.length === 0 || this.isLoading)
173178
},
174179
},
175180

src/components/Nav/CollectiveMembersModal.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
:circleId="collective.circleId"
2626
:currentUserIsAdmin
2727
:currentMembers="circleMembersSorted(collective.circleId)"
28+
:isLoading="isLoadingMembers"
2829
:onClickSearched />
2930
</div>
3031
</NcModal>
@@ -63,7 +64,7 @@ export default {
6364
],
6465
6566
computed: {
66-
...mapState(useCirclesStore, ['circleMembersSorted']),
67+
...mapState(useCirclesStore, ['circleMembersSorted', 'currentCircleMembersFullyLoaded']),
6768
...mapState(useCollectivesStore, ['isCollectiveAdmin']),
6869
...mapState(useRootStore, ['isPublic']),
6970
@@ -82,6 +83,10 @@ export default {
8283
showTeamLink() {
8384
return this.hasContactsApp && !this.isPublic
8485
},
86+
87+
isLoadingMembers() {
88+
return !this.currentCircleMembersFullyLoaded
89+
},
8590
},
8691
8792
beforeMount() {

0 commit comments

Comments
 (0)