Commit b614085
committed
fix(tables): resolve undo layout ownership at write time, not dispatch time
The layout writes for column create/delete happen in mutation success
callbacks, and persistLayoutRef is rebound every render. Resolving
entryOwnsLayout up front meant the guard could still hold from before a view
switch while the sink it guarded already pointed at the destination, writing
the recorded view's layout into whichever view was now active.
Now a function, so the guard and the sink are read at the same moment: switch
away mid-mutation and the schema half still lands while the layout half is
dropped, matching the rule that undo only ever affects the view on screen.1 parent 7d86bd3 commit b614085
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
343 | 348 | | |
344 | 349 | | |
345 | 350 | | |
346 | | - | |
| 351 | + | |
347 | 352 | | |
348 | 353 | | |
349 | 354 | | |
| |||
435 | 440 | | |
436 | 441 | | |
437 | 442 | | |
438 | | - | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| |||
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
467 | | - | |
| 472 | + | |
468 | 473 | | |
469 | 474 | | |
470 | 475 | | |
| |||
529 | 534 | | |
530 | 535 | | |
531 | 536 | | |
532 | | - | |
| 537 | + | |
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
| |||
0 commit comments