goellner / statamic-assets-organized

Organizes Statamic assets in subdirectories
MIT License
1 stars 1 forks source link

Replicator Preview Text #3

Open RomainFrancony opened 5 years ago

RomainFrancony commented 5 years ago

Hi, first thanks for the addon, it's really great !

When using inside a replicator, the preview text is [object Object] which is not really helpful.

It would be great to have the same as the classic assets fieldtype.

So I tried to do this:

Now this works except you're oblige to interact with the set (open then close) in order to work. Because the function is called on ready lifecycle hook but the assets fieldtype is not yet ready (which is why i put if (this.$refs.field). By opening or closing the set, the replicator will call the function and this time the assets fieldtype will be ready.

Hope this will help you !

goellner commented 5 years ago

Currently, I don't have the time to make changes to the addon. If you submit a pull request for this, I will merge it and add a new release for it.