Commit 0fc8935
* feat(plugin-list): 列表工具栏增加手动刷新按钮 (#2634)
列表(ListView)工具栏此前没有主动刷新入口,后端数据变更后只能靠浏览器
整页 reload,导致筛选/排序/分页/滚动等页面状态全部丢失。
新增「刷新」按钮:点击后仅重新拉取当前视图数据(bump refreshKey 触发
re-fetch),筛选/排序/分页/搜索均为组件内 state,刷新时自动保留。按钮
在移动端与桌面端均常驻,加载时图标旋转。
开关采用 spec 规范的 userActions.refresh(@objectstack/spec ListView),
并向后兼容 legacy showRefresh 标志,默认可见(opt-out),与其它工具栏
开关(search/sort/filter/density)行为一致。
注:数据变更后的自动刷新(onMutation 订阅)与移动端下拉刷新此前已具备,
本次补齐的是缺失的桌面端手动刷新入口。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7Z2cbcb14wb99upTD6LNw
* refactor(plugin-list): gate refresh button purely on spec userActions.refresh
CI drift guard (list-view-spec-parity) flags new objectui-only ListView
fields and asks to promote them into @objectstack/spec instead. `refresh`
is already promoted (userActions.refresh), so drop the just-added legacy
`showRefresh` zod flag and gate the toolbar button solely on
`userActions.refresh` (read defensively; visible by default, opt-out via
`userActions.refresh: false`).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7Z2cbcb14wb99upTD6LNw
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 24d34a1 commit 0fc8935
4 files changed
Lines changed: 115 additions & 0 deletions
File tree
- packages
- i18n/src/locales
- plugin-list/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| 424 | + | |
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| |||
390 | 391 | | |
391 | 392 | | |
392 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
393 | 398 | | |
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
| 402 | + | |
397 | 403 | | |
398 | 404 | | |
399 | 405 | | |
| |||
2147 | 2153 | | |
2148 | 2154 | | |
2149 | 2155 | | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
2150 | 2175 | | |
2151 | 2176 | | |
2152 | 2177 | | |
| |||
Lines changed: 88 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
0 commit comments