Commit e535b3d
committed
Fix workspace initialization on first mount
The workspace list wasn't being loaded on first component mount because
lastConfigRef was initialized with config, so on the first useEffect run,
lastConnection === currentConnection and initialization was skipped.
Added initializedRef flag to ensure workspaces are loaded on first mount,
then only re-initialize when the connection string changes. This ensures
saved workspaces appear in the UI after page reload while still preserving
local edits during the same session.1 parent fe9dbc8 commit e535b3d
File tree
1 file changed
+4
-2
lines changed- exec/java-exec/src/main/resources/webapp/src/components/datasource
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| |||
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| 373 | + | |
372 | 374 | | |
373 | 375 | | |
374 | 376 | | |
| |||
0 commit comments