Allow for disabling fields in List column selector #6111
Replies: 6 comments 3 replies
-
Hey there - the Are you seeing something different? |
Beta Was this translation helpful? Give feedback.
-
I'm not using TypeScript. But yes, this explains it, I didn't realize that the behavior of |
Beta Was this translation helpful? Give feedback.
-
@jmikrut Hm but then how do I get rid of those fields here? |
Beta Was this translation helpful? Give feedback.
-
I found a workaround, but of course it's not ideal. I can just set the name to To get rid of the empty boxes, I then use this CSS: .column-selector__column:has(.pill__label:empty) {
display: none;
} |
Beta Was this translation helpful? Give feedback.
-
For UI fields in specific, there is no good way to allow for disabling columns from being selected without custom CSS at the moment. But, we should build that. It would be a super easy thing for us to add as a feature. Maybe we add an I will convert this to a Feature Request so that we can implement that accordingly! Until then, I think your CSS trick is probably the best way. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to reproduction
No response
Describe the Bug
When I have a top-level UI field that has a
condition
, loading the form crashes the admin with the following error:It seems the problem is that
path
is undefined.It works with the ugly workaround of giving the field a name and adding a
beforeChange
hook which removes it from the data again.Interestingly, when the field is within a tab (even one without a name!), it doesn't crash.
To Reproduce
Create a top-level UI field like this:
Payload Version
2.14.2
Adapters and Plugins
db-mongodb, bundler-webpack
Beta Was this translation helpful? Give feedback.
All reactions