ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Support custom callbacks in `AssetReferenceUpdater` for handling custom fieldtypes

Open jacksleight opened this issue 4 years ago • 5 comments

The AssetReferenceUpdater handles all the built-in fieldtypes, but doesn't have a way to update custom fieldtypes. This means that asset values either stored directly in a custom field, or in an asset/bard/markdown field that's nested inside a custom field, aren't updated when an asset changes.

It would be useful if people extending or addons could add some kind of custom callbacks to the updater, so they can update their values at the same time the core fieldtype values are updated.

I think it might be possible to update assets in custom fields already, by basically duplicating what the asset listener and AssetReferenceUpdater do, but it feels like a built in solution within AssetReferenceUpdater would be tidier, and probably more performant as well (otherwise you'd be scanning through the entries multiple times).

jacksleight avatar Nov 11 '21 12:11 jacksleight