Skip to content

Commit 7f15147

Browse files
authored
fix: ui field validation error with admin.disableListColumn property (#6531)
## Description V2 PR [here](#6530) - [x] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [x] This change requires a documentation update ## Checklist: - [x] Existing test suite passes locally with my changes - [x] I have made corresponding changes to the documentation
1 parent e0a6db7 commit 7f15147

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

docs/fields/ui.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ With this field, you can also inject custom `Cell` components that appear as add
3131
| **`label`** | Human-readable label for this UI field. |
3232
| **`admin.components.Field`** \* | React component to be rendered for this field within the Edit view. [More](/docs/admin/components/#field-component) |
3333
| **`admin.components.Cell`** | React component to be rendered as a Cell within collection List views. [More](/docs/admin/components/#field-component) |
34+
| **`admin.disableListColumn`** | Set `disableListColumn` to `true` to prevent the UI field from appearing in the list view column selector. |
3435
| **`custom`** | Extension point for adding custom data (e.g. for plugins) |
3536

3637
_\* An asterisk denotes that a property is required._

packages/payload/src/fields/config/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ export const ui = joi.object().keys({
549549
.default({}),
550550
condition: joi.func(),
551551
custom: joi.object().pattern(joi.string(), joi.any()),
552+
disableListColumn: joi.boolean().default(false),
552553
position: joi.string().valid('sidebar'),
553554
width: joi.string(),
554555
})

packages/payload/src/fields/config/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,6 @@ export type UIField = {
463463
* @type boolean
464464
*/
465465
disableListColumn?: boolean
466-
/**
467-
* Shows / hides fields from appearing in the list view filter options.
468-
* @type boolean
469-
*/
470-
disableListFilter?: boolean
471466
position?: string
472467
width?: string
473468
}

0 commit comments

Comments
 (0)