Commit d9b3c07
fix: expose type for field's
Adds `FieldPosition = 'main' | 'sidebar'` and uses it in `FieldAdmin`
and `AdminClient,` replacing the previous `'sidebar'`-only type.
This is especially useful when overriding a plugin field's default
`position: 'sidebar'` back to `'main'`, which already worked at runtime
but failed type-checking.
Also updates the docs to list both options and exports `FieldPosition`
from the package index.
---------
Co-authored-by: Patrik Kozak <35232443+PatrikKozak@users.noreply.github.com>position (#14390)1 parent 72396f6 commit d9b3c07
File tree
3 files changed
+6
-3
lines changed- docs/fields
- packages/payload/src
- fields/config
3 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
| 623 | + | |
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
| |||
385 | 387 | | |
386 | 388 | | |
387 | 389 | | |
388 | | - | |
| 390 | + | |
389 | 391 | | |
390 | 392 | | |
391 | 393 | | |
| |||
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
| 419 | + | |
418 | 420 | | |
419 | 421 | | |
420 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1570 | 1570 | | |
1571 | 1571 | | |
1572 | 1572 | | |
| 1573 | + | |
1573 | 1574 | | |
1574 | 1575 | | |
1575 | 1576 | | |
| |||
0 commit comments