Allow access to 'blockData' in hooks/conditions #1665
Replies: 2 comments 1 reply
-
I have experienced this and worked around the problem by changing my data model just to simplify conditional logic. I am curious what would make writing complex conditionals easier? Perhaps some helper functions that take the full data object and help with traversing documents a new passed in path property? |
Beta Was this translation helpful? Give feedback.
-
Bumping this issue as my team and I were discussing this problem recently. We are currently rebuilding our company website using Payload CMS and NextJS 13. I definitely agree with @christian-reichart, there should truly be a low friction way to access fields held within a Block when using conditional logic on fields that are nested within groups or arrays. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I now often times had the problem that I wanted to conditionally show a field inside a block depending on another field in the block. Whenever the specific field is placed inside a group/array/..., I can't access the field to base the condition on with siblingData. Using the whole document is also not practical, as I only need to care about the block scope.
Is this something that could be added?
Beta Was this translation helpful? Give feedback.
All reactions