|
|
@ -39,8 +39,20 @@ export default function CollectionMembers(props: PropsType) {
|
|
|
|
const colMgr = getCollectionManager(etebase);
|
|
|
|
const colMgr = getCollectionManager(etebase);
|
|
|
|
const memberManager = colMgr.getMemberManager(collection);
|
|
|
|
const memberManager = colMgr.getMemberManager(collection);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const members = await memberManager.list();
|
|
|
|
const ret: Etebase.CollectionMember[] = [];
|
|
|
|
setMembers(members.data);
|
|
|
|
let iterator: string | null = null;
|
|
|
|
|
|
|
|
let done = false;
|
|
|
|
|
|
|
|
while (!done) {
|
|
|
|
|
|
|
|
// FIXME: shouldn't be any
|
|
|
|
|
|
|
|
const members: any = await memberManager.list({ iterator, limit: 30 });
|
|
|
|
|
|
|
|
iterator = members.iterator;
|
|
|
|
|
|
|
|
done = members.done;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const member of members.data) {
|
|
|
|
|
|
|
|
ret.push(member);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setMembers(ret);
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
setError(e);
|
|
|
|
setError(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|