Commit 504cea8
committed
fix(tables): carry type metadata through the import column-create path
`addTableColumnsWithTx` built each column from five fields and dropped
everything else the caller supplied, so an imported date column landed with
`includeTime` absent — the "predates the key" state — and coercion and the grid
then treated a column created moments ago as a legacy instant column. It now
carries the type's owned keys and defaults, the same way `addTableColumn` does.
An inferred date column is stamped `includeTime: true` rather than taking the
sidebar's date-only default. The pattern that infers `date` accepts
`2024-01-15T14:30`, so the file may genuinely contain times, and defaulting to
date-only would truncate every one of them on write. Creating a Date column by
hand still defaults to date-only: there the user sees the toggle and there is
no data to lose yet.1 parent 96f5a12 commit 504cea8
3 files changed
Lines changed: 61 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
589 | 614 | | |
590 | 615 | | |
591 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
378 | 388 | | |
379 | 389 | | |
380 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
468 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
469 | 482 | | |
470 | 483 | | |
471 | 484 | | |
| |||
501 | 514 | | |
502 | 515 | | |
503 | 516 | | |
| 517 | + | |
504 | 518 | | |
505 | 519 | | |
506 | 520 | | |
507 | | - | |
| 521 | + | |
508 | 522 | | |
509 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
510 | 532 | | |
511 | 533 | | |
512 | 534 | | |
| |||
0 commit comments