Commit 30b6d93
Add setTimeout(0) to allow spinner to render before heavy computation
The issue was that the synchronous operations were executing immediately after showing the spinner, without giving the browser a chance to paint the DOM changes. By adding `await new Promise(resolve => setTimeout(resolve, 0))`, we yield control back to the event loop, allowing the browser to render the spinner before the expensive cluster sorting operations begin.
This ensures the spinner is visible during the 1-3 second delay on large clusters.
Co-authored-by: lstein <111189+lstein@users.noreply.github.com>1 parent a3e9fbb commit 30b6d93
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1263 | 1266 | | |
1264 | 1267 | | |
1265 | 1268 | | |
| |||
1302 | 1305 | | |
1303 | 1306 | | |
1304 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1305 | 1311 | | |
1306 | 1312 | | |
1307 | 1313 | | |
| |||
0 commit comments