@blocklet/ui-react 2.13.65 → 2.13.67
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.
|
@@ -157,6 +157,12 @@ export default function UserSessions({
|
|
|
157
157
|
visitorId,
|
|
158
158
|
includeFederated: true
|
|
159
159
|
});
|
|
160
|
+
const { page = 0 } = filterParams;
|
|
161
|
+
const { list = [] } = pageState.data || {};
|
|
162
|
+
const currentPageLength = list.length || 0;
|
|
163
|
+
if (page > 1 && currentPageLength === 1) {
|
|
164
|
+
filterParams.page = Math.max(page - 1, 1);
|
|
165
|
+
}
|
|
160
166
|
pageState.refresh();
|
|
161
167
|
confirmApi.close();
|
|
162
168
|
}
|
|
@@ -181,6 +187,7 @@ export default function UserSessions({
|
|
|
181
187
|
visitorId: currentVisitorId,
|
|
182
188
|
includeFederated: true
|
|
183
189
|
});
|
|
190
|
+
filterParams.page = 1;
|
|
184
191
|
pageState.refresh();
|
|
185
192
|
confirmApi.close();
|
|
186
193
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.67",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@abtnode/constant": "^1.16.44",
|
|
36
36
|
"@abtnode/util": "^1.16.44",
|
|
37
|
-
"@arcblock/bridge": "^2.13.
|
|
38
|
-
"@arcblock/react-hooks": "^2.13.
|
|
37
|
+
"@arcblock/bridge": "^2.13.67",
|
|
38
|
+
"@arcblock/react-hooks": "^2.13.67",
|
|
39
39
|
"@arcblock/ws": "^1.20.14",
|
|
40
40
|
"@blocklet/constant": "^1.16.44",
|
|
41
|
-
"@blocklet/did-space-react": "^1.0.
|
|
41
|
+
"@blocklet/did-space-react": "^1.0.60",
|
|
42
42
|
"@iconify-icons/logos": "^1.2.36",
|
|
43
43
|
"@iconify-icons/material-symbols": "^1.2.58",
|
|
44
44
|
"@iconify-icons/tabler": "^1.2.95",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"jest": "^29.7.0",
|
|
95
95
|
"unbuild": "^2.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "48b2f513128c3161fcdf4e6aaac3c68c14cb1850"
|
|
98
98
|
}
|
|
@@ -205,6 +205,13 @@ export default function UserSessions({
|
|
|
205
205
|
visitorId,
|
|
206
206
|
includeFederated: true,
|
|
207
207
|
});
|
|
208
|
+
// 如果当前页没有数据需要向前翻页
|
|
209
|
+
const { page = 0 } = filterParams;
|
|
210
|
+
const { list = [] } = pageState.data || {};
|
|
211
|
+
const currentPageLength = list.length || 0;
|
|
212
|
+
if (page > 1 && currentPageLength === 1) {
|
|
213
|
+
filterParams.page = Math.max(page - 1, 1);
|
|
214
|
+
}
|
|
208
215
|
pageState.refresh();
|
|
209
216
|
confirmApi.close();
|
|
210
217
|
},
|
|
@@ -229,6 +236,8 @@ export default function UserSessions({
|
|
|
229
236
|
visitorId: currentVisitorId as string,
|
|
230
237
|
includeFederated: true,
|
|
231
238
|
});
|
|
239
|
+
// 重置至第一页
|
|
240
|
+
filterParams.page = 1;
|
|
232
241
|
pageState.refresh();
|
|
233
242
|
confirmApi.close();
|
|
234
243
|
},
|