The data argument of the beforeChange collection hook looks like this:
{
slug: 'slug-in-german',
title: 'Title in German',
excerpt: 'The excerpt goes here.',
_status: 'draft',
}
I'd like to get the config of each of these fields (ultimately to know whether or not the field is localized: true or not).
I went in and used req.payload.config.collections, filtered it to get the current collection, and started parsing that to try and reduce it to something that would look like this:
{
slug: false,
title: true,
excerpt: true,
_status: false,
}
But once you start adding Tabs and Groups and Arrays and Blocks and ... into the mix, it start getting a little hairy and feeling grosser and grosser. ๐
There's got to be a better way, right? ๐ ๐ค