sea-chart 1.1.43 → 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.
|
@@ -91,6 +91,8 @@ class Records extends Component {
|
|
|
91
91
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
92
92
|
className: "table-element-container",
|
|
93
93
|
ref: ref => this.resultContainerRef = ref
|
|
94
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: "table-element-result-container"
|
|
94
96
|
}, /*#__PURE__*/React.createElement("div", {
|
|
95
97
|
className: "table-element-result-content",
|
|
96
98
|
style: {
|
|
@@ -107,7 +109,7 @@ class Records extends Component {
|
|
|
107
109
|
collaborators: collaborators,
|
|
108
110
|
queryUsers: this.props.queryUsers,
|
|
109
111
|
setVerticalScrollbarTop: this.setVerticalScrollbarTop
|
|
110
|
-
})), /*#__PURE__*/React.createElement(VerticalScrollbar, {
|
|
112
|
+
}))), /*#__PURE__*/React.createElement(VerticalScrollbar, {
|
|
111
113
|
contentHeight: 33 * records.length,
|
|
112
114
|
ref: ref => this.verticalScrollbar = ref,
|
|
113
115
|
onScrollbarScroll: this.onVerticalScrollbarScroll
|
|
@@ -9,11 +9,21 @@
|
|
|
9
9
|
max-width: 100%;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.table-element-result-container {
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
overflow: auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.table-element-result-table-content::-webkit-scrollbar {
|
|
19
|
+
width: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
12
22
|
.table-element-container {
|
|
13
|
-
overflow
|
|
23
|
+
overflow: hidden;
|
|
14
24
|
height: 100%;
|
|
15
25
|
width: 100%;
|
|
16
|
-
|
|
26
|
+
padding-right: 15px;
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
.table-element-result-content {
|
|
@@ -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 {
|