v3
I'm trying to show a custom message when the hero type is selected as "none" but the UI is showing regardless what the value is
// ...
type: 'tabs',
tabs: [
{
name: 'content',
fields: [
{
type: 'ui',
name: 'messageUI',
admin: {
components: {
Field: () => {
return Message({ message: 'No fields to show.' })
},
},
condition: (data, _) => {
return data?.hero?.type === 'none'
},
},
},
// ...
Custom Message component
type Props = {
message: string
}
export const Message = ({ message }: Props) => {
return <em>{message}</em>
}