mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(economic): fix national debt panel hang + add lazy pagination (#1928)
- Remove persistCache from nationalDebtBreaker: IndexedDB hydration on first call can deadlock in some browsers, causing the panel to hang indefinitely showing "Loading debt data from IMF..." with no timeout - Add 20s hard deadline via Promise.race so loading always resolves - Extract _fetchNationalDebt() to avoid top-level await in the race - Lazy-load 20 countries initially with "Load more" button (+20 each tap) instead of rendering all 187 rows at once; resets on sort/search change - Ticker only updates visible rows (not all 187)
This commit is contained in:
@@ -20264,6 +20264,30 @@ body.has-breaking-alert .panels-grid {
|
||||
min-width: 70px;
|
||||
}
|
||||
|
||||
.debt-load-more {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
margin: 4px 0;
|
||||
background: none;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
color: var(--text-dim);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
}
|
||||
|
||||
.debt-load-more:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.debt-load-more-count {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.debt-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user