Description
Radio fields (type: 'radio') do not reliably trigger admin.condition re-evaluation on sibling fields when used inside blocks (which are children of an array/blocks layout field).
Two concrete cases from production:
Case 1: Block-level radio — completely broken
A miniCasesSlider block has a sourceType radio field that toggles between collection and manual modes. Two sibling fields use admin.condition to show/hide based on this value. Changing the radio value has no effect — conditional fields never show/hide.
// Block config (inside layout blocks array)
{
name: 'sourceType',
type: 'radio', // ← does NOT trigger condition re-evaluation
defaultValue: 'collection',
options: [
{ label: 'From collection', value: 'collection' },
{ label: 'Manual', value: 'manual' },
],
admin: { layout: 'horizontal' },
},
{
name: 'selectedCases',
type: 'relationship',
relationTo: 'mini-cases',
hasMany: true,
admin: {
condition: (_data, siblingData) => siblingData?.sourceType === 'collection',
},
},
{
name: 'manualCases',
type: 'array',
admin: {
condition: (_data, siblingData) => siblingData?.sourceType === 'manual',
},
fields: [/* ... */],
},
Case 2: Link field radio — works intermittently with delay
The shared link field has a type radio (reference/custom) with conditions on reference and url fields. Toggling the radio works but with significant delay, and sometimes requires clicking back and forth multiple times before the conditional fields update.
// Inside a link group field, used across many blocks
{
name: 'type',
type: 'radio', // ← intermittent, delayed condition re-evaluation
defaultValue: 'reference',
admin: { layout: 'horizontal', width: '50%' },
options: [
{ label: 'Internal link', value: 'reference' },
{ label: 'Custom URL', value: 'custom' },
],
},
{
name: 'reference',
type: 'relationship',
admin: {
condition: (_d, siblingData) => siblingData?.type !== 'custom',
},
},
{
name: 'url',
type: 'text',
admin: {
condition: (_d, siblingData) => siblingData?.type === 'custom',
},
},
Workaround
Changing from type: 'radio' to type: 'select' fixes both cases completely — conditions trigger instantly and reliably.
Important context: In the same project, 15+ other blocks use type: 'select' with the exact same admin.condition pattern (e.g., TestimonialsBlock, ArchiveBlock, RelatedPosts, ComparisonBlock, CallToAction) and all work correctly. Only radio fields exhibit this behavior.
Steps to Reproduce
- Create a block with a
radio field and sibling fields that use admin.condition based on the radio value
- Add this block to a page's layout (blocks array field)
- In the admin panel, change the radio value
- Observe: conditional fields do not update (Case 1) or update only after multiple clicks with delay (Case 2)
- Change the field to
type: 'select' — conditions work immediately
Expected Behavior
Changing a radio field value should trigger immediate re-evaluation of admin.condition on all sibling fields, identical to how select fields behave.
Versions
- Payload:
3.79.0
- Next.js:
16.1.6
- Node: v22
- Database: MongoDB
Description
Radio fields (
type: 'radio') do not reliably triggeradmin.conditionre-evaluation on sibling fields when used inside blocks (which are children of anarray/blockslayout field).Two concrete cases from production:
Case 1: Block-level radio — completely broken
A
miniCasesSliderblock has asourceTyperadio field that toggles betweencollectionandmanualmodes. Two sibling fields useadmin.conditionto show/hide based on this value. Changing the radio value has no effect — conditional fields never show/hide.Case 2: Link field radio — works intermittently with delay
The shared
linkfield has atyperadio (reference/custom) with conditions onreferenceandurlfields. Toggling the radio works but with significant delay, and sometimes requires clicking back and forth multiple times before the conditional fields update.Workaround
Changing from
type: 'radio'totype: 'select'fixes both cases completely — conditions trigger instantly and reliably.Important context: In the same project, 15+ other blocks use
type: 'select'with the exact sameadmin.conditionpattern (e.g.,TestimonialsBlock,ArchiveBlock,RelatedPosts,ComparisonBlock,CallToAction) and all work correctly. Onlyradiofields exhibit this behavior.Steps to Reproduce
radiofield and sibling fields that useadmin.conditionbased on the radio valuetype: 'select'— conditions work immediatelyExpected Behavior
Changing a
radiofield value should trigger immediate re-evaluation ofadmin.conditionon all sibling fields, identical to howselectfields behave.Versions
3.79.016.1.6