When using conditions inside blocks, I can use siblingData to get data on the same hierarchy level - so far so good. When I need to access parent data (Think: a global "Show Buttons"-checkbox in a Grid component built with an Array Field in Payload) I would have to use data - unfortunately, this gives me the full page data, with which it's extremely difficult (and inefficient) to retrieve the right block from the array.
Is there any way to filter the "data" attribute only to data inside the block, but not on the same level as with siblingData?
Condition inside block - how to access parent data inside block?
Hey @zakoul - there isn't a built in way to do this currently but you could pull in both data and siblingData, then use the siblingData.id
to find your active block from the full data.
Get help straight from the Payload team with an Enterprise License.