Like what we’re doing? Star us on GitHub!

siblingData in afterRead hook wrong?

6 months ago
1 1

I'm not sure if I'm missing something, but I'm trying to implement an afterRead hook for a field.
the siblingData inside only contains the data of the field, not of the whole block. The other hooks work fine.

Example siblingData of afterChange hook on the field 'rentPages':

siblingData:  {
  id: '632c5632dd4397a36b55c5c3',
  variant: 'rent',
  rentPages: [ { value: '632c53526b4b99f8c0c01559', relationTo: 'rent-pages' } ],
  blockType: 'slider',
  layout: { top: 'default', bottom: 'default' }

Potentially wrong siblingData of afterRead hook on the field 'rentPages':

siblingData:  [ { value: '632c53526b4b99f8c0c01559', relationTo: 'rent-pages' } ]

Am I missing something or is this a bug?
Thanks for any hints.

  • christian-reichart
    5 months ago

    fixed: #1201

Open the post
Continue the discussion in GitHub
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More