sea-chart 1.1.44 → 1.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,6 +25,21 @@ export default class TableElement extends React.Component {
|
|
|
25
25
|
let queryEmails = emails.filter(email => {
|
|
26
26
|
return !this.relatedUserEmailMap[email];
|
|
27
27
|
});
|
|
28
|
+
if (queryEmails.length === 0) return;
|
|
29
|
+
if (this.isQuerying) {
|
|
30
|
+
this.pendingUserList = this.pendingUserList.concat(queryEmails);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.isQuerying = true;
|
|
34
|
+
context.queryUsers(queryEmails, this.updateRelatedUser);
|
|
35
|
+
};
|
|
36
|
+
this.queryPendingUsers = () => {
|
|
37
|
+
if (this.pendingUserList.length === 0) {
|
|
38
|
+
this.isQuerying = false;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
let queryEmails = [...new Set(this.pendingUserList)];
|
|
42
|
+
this.pendingUserList = [];
|
|
28
43
|
context.queryUsers(queryEmails, this.updateRelatedUser);
|
|
29
44
|
};
|
|
30
45
|
this.updateRelatedUser = emailUserMap => {
|
|
@@ -41,6 +56,7 @@ export default class TableElement extends React.Component {
|
|
|
41
56
|
relatedUserList: newUsers
|
|
42
57
|
});
|
|
43
58
|
}
|
|
59
|
+
this.queryPendingUsers();
|
|
44
60
|
};
|
|
45
61
|
const {
|
|
46
62
|
chart,
|
|
@@ -56,6 +72,8 @@ export default class TableElement extends React.Component {
|
|
|
56
72
|
initState.relatedUserList.forEach(u => {
|
|
57
73
|
this.relatedUserEmailMap[u.email] = true;
|
|
58
74
|
});
|
|
75
|
+
this.isQuerying = false;
|
|
76
|
+
this.pendingUserList = [];
|
|
59
77
|
}
|
|
60
78
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
61
79
|
const {
|